HTTP Test Tool

Web Proxy Server Testing


Proxy server tests need in allmost all cases a client and a server. Perhaps you like to make a mean request from the client or give a error phorne answer from the server.

A simple small test will give you a good starting point.

Simple test script

Assume your Proxy is on localhost 8080.

httest script contains:

CLIENT
_REQ localhost 8080
__GET http://localhost:9090/foo/bar HTTP/1.1
__Host localhost:8080
__
_EXPECT . "HTTP/1\.1 200 Ok"
_EXPECT . "Hello World"
_WAIT
END


SERVER 9090
_RES
_EXPECT . "GET /foo/bar HTTP/1\.1"
_WAIT
__HTTP/1.1 200 Ok
__Content-Lenght: AUTO
__
__Hello World
END

Your client sets the request to your proxy. The proxy then should connect to your localhost server on port 9090, which we have defined in the same script.

_EXPECT . "a regular expression" will test your headers and body for the given pattern defined as a regular expression