HTTP Test Tool

Browser Testing


If you like to test your web browser/client with httest, you need in all cases a test server, which delivers the content. Your httest server could deliver a error phrone reponse to test if your web browser can handle this or not.

For example you could test if the client handles a redirect correctly.

The following script will give you a good starting point for your own tests.

Simple Test Server

SERVER 8080
_RES
_EXPECT . "GET / HTTP/1.1"
_WAIT
__HTTP/1.1 302 Found
__Location: http://localhost:8080/foo/bar
__Content-Type: text/plain
__Content-Length: AUTO
__
__http://localhost:8080/foo/bar

_RES
_EXPECT . "GET /foo/bar HTTP/1.1"
_WAIT
__HTTP/1.1 200 OK
__Content-Type: text/plain
__Content-Length: AUTO
__
__Your content
END

Connect your client to localhost:8080 and send the request GET / HTTP/1.1 to the test server. The test server will deliver a redirect to /foo/bar. The second request the server expecst must be GET /foo/bar HTTP/1.1 else redirect did not work correctly. You could extend the redirect test with parameters.