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/
>
>
>