Re: HTTP Testing Resources

Sawood Alam <ibnesayeed@gmail.com> Tue, 09 April 2019 13:08 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0B2531207EE for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 9 Apr 2019 06:08:38 -0700 (PDT)
X-Quarantine-ID: <ktQ2NA44Hsl3>
X-Virus-Scanned: amavisd-new at amsl.com
X-Amavis-Alert: BANNED, message contains text/plain,.exe
X-Spam-Flag: NO
X-Spam-Score: -2.998
X-Spam-Level:
X-Spam-Status: No, score=-2.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ktQ2NA44Hsl3 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 9 Apr 2019 06:08:36 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [IPv6:2603:400a:ffff:804:801e:34:0:38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 05D7B120305 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 9 Apr 2019 06:08:35 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.89) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1hDqTM-0007zT-8C for ietf-http-wg-dist@listhub.w3.org; Tue, 09 Apr 2019 13:07:32 +0000
Resent-Date: Tue, 09 Apr 2019 13:07:32 +0000
Resent-Message-Id: <E1hDqTM-0007zT-8C@frink.w3.org>
Received: from uranus.w3.org ([128.30.52.58]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <ibnesayeed@gmail.com>) id 1hDqTK-0007yM-Un for ietf-http-wg@listhub.w3.org; Tue, 09 Apr 2019 13:07:30 +0000
Received: from www-data by uranus.w3.org with local (Exim 4.89) (envelope-from <ibnesayeed@gmail.com>) id 1hDqTK-0000ez-PK for ietf-http-wg@listhub.w3.org; Tue, 09 Apr 2019 13:07:30 +0000
Received: from titan.w3.org ([2603:400a:ffff:804:801e:34:0:4c]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <ibnesayeed@gmail.com>) id 1hDeFn-0005fQ-8X for ietf-http-wg@listhub.w3.org; Tue, 09 Apr 2019 00:04:43 +0000
Received: from mail-it1-x12d.google.com ([2607:f8b0:4864:20::12d]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from <ibnesayeed@gmail.com>) id 1hDeFk-0007US-P5 for ietf-http-wg@w3.org; Tue, 09 Apr 2019 00:04:42 +0000
Received: by mail-it1-x12d.google.com with SMTP id w15so2148687itc.0 for <ietf-http-wg@w3.org>; Mon, 08 Apr 2019 17:04:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YzA39mIY7QYJWTYfAy8+BKg/tLgzGRYI2dW5UMzNtok=; b=gNIwMr5Nq0kh6BjYAqmqk487cVfO/gLWkDc5zWN38mqB20mRBNi3dfC/fJPOiLLq4V TeCI8btiA2oaj6fm5McqhmgXpVP+qzjxYo04aI2BIInvxMZiFCTMFc1OsXQWweZcEXrA blDFZUEBb25dfL7C+CfE8+Ss1kpc88najf9TI7pTOYoYU6fL7dRoOWAqW9uk6NUiJkzM 0IO/MYTagaEqjs7Im6cbVyeADRy4N7kVnnfKCQANlbiCd5iGgYbbORR1KKgZ6VRwd22e f9G1oV3XNFR7f8lAj4x10e4pJ8G79TRkgw/tN6cWmNHWvxiuI4PJJNrFCX90Jl7swsCq HSfg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YzA39mIY7QYJWTYfAy8+BKg/tLgzGRYI2dW5UMzNtok=; b=YImQutLQvaUV9QCxq6W+UgMSyynhsFBHwd78z7qVYrnACRnvsoeerSsBE7pPgDqt6L ouI4HkL8QfU6EYJwC1VJqQHq31t1x7Rj4wRIyLlkGMYbM6Ty7UVYrVWAwABJRJAfpl/s f7m4pUvva2EA6xqRHikCPXLT3gsKjcfMZtg+nn2ao2ifNpLtMRkqxpya6NIL8CVxE3p5 2xJn+5ZkyfFcVk/ZypERbkuhTBKCoBHxxOekfSdO02rnmFJ6hYPeDo4+oeLMi030eZXZ w6cHVSh6lgeeQgrSojET7yF+wU4S5jCJOfqVA9hXJxA8UIeXP0OpTjWAUVpML2EfLoAn kXYw==
X-Gm-Message-State: APjAAAVt5BsxZPrKyNLVhNvNuBm2z3XYv8tkBu7KSNQlJRC9tDwMVHJa 0YqpDeP9+jL/eI2M9qkean6CVpRMvO28s4Sc3ZQ=
X-Google-Smtp-Source: APXvYqy16yf+0MPCwUbimGenW0uYla63b3+sh7Gu8RFChSmLkogp7aNQVP4jX7NDgnENxLivgLq1wwukJHQ7k2Aa5qQ=
X-Received: by 2002:a02:b008:: with SMTP id p8mr24141791jah.90.1554768259423; Mon, 08 Apr 2019 17:04:19 -0700 (PDT)
MIME-Version: 1.0
References: <5D06B498-B7C4-4F82-9935-D7D95D9DC6A9@mnot.net>
In-Reply-To: <5D06B498-B7C4-4F82-9935-D7D95D9DC6A9@mnot.net>
From: Sawood Alam <ibnesayeed@gmail.com>
Date: Mon, 08 Apr 2019 20:03:53 -0400
Message-ID: <CALOnmf9u8O8tXOHbdGycBY2uzLkdTOcaA3m867AOnJP5NRgFwA@mail.gmail.com>
To: Mark Nottingham <mnot@mnot.net>
Cc: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>, Tommy Pauly <tpauly@apple.com>, Patrick McManus <mcmanus@ducksong.com>
Content-Type: multipart/alternative; boundary="000000000000cfa37905860db175"
Received-SPF: pass client-ip=2607:f8b0:4864:20::12d; envelope-from=ibnesayeed@gmail.com; helo=mail-it1-x12d.google.com
X-W3C-Hub-Spam-Status: No, score=-4.1
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1hDeFk-0007US-P5 d56bfa48c143dcd5e41c2ed51af5f6fc
X-caa-id: 1f44f3f925
X-Original-To: ietf-http-wg@w3.org
Subject: Re: HTTP Testing Resources
Archived-At: <https://www.w3.org/mid/CALOnmf9u8O8tXOHbdGycBY2uzLkdTOcaA3m867AOnJP5NRgFwA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/36513
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Hi,

Last year I wrote a web server tester library along with a handful of
custom test suites to automate testing/grading of students' assignments of
the Web Server Design course. While I think it is relevant here, I would
wait for some feedback before I decide to add it to the wiki. Here is how
it works:

First, write a template file (say, "malformed-header.http") for the request
data (which can be a single HTTP message or multiple messages put together
for pipeline requests) as following:

GET /foo HTTP/1.1
Host: <HOSTPORT>
Header with missing colon

Then write a test method in a test suite class, inherited from the base
tester class, as following:

@make_request("malformed-header.http")
def test_bad_request_header(self, report):
"""Test whether the server recognizes malformed headers"""
    self.check_status_is(report, 400)

From there, the test can be run against any HTTP server using the included
CLI or Web UI.

I am planning to improve it further when I will offer this course in the
Fall 2019.

Best,

--
Sawood Alam
Department of Computer Science
Old Dominion University
Norfolk VA 23529



On Mon, Apr 8, 2019 at 7:43 PM Mark Nottingham <mnot@mnot.net> wrote:

> Hi everyone,
>
> We've started collecting resources that might be helpful to test HTTP
> implementations here:
>   https://github.com/httpwg/wiki/wiki/HTTP-Testing-Resources
>
> Thoughts / additions?
>
> Cheers,
>
> --
> Mark Nottingham   https://www.mnot.net/
>
>
>