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:
_REQ localhost 8080
__GET http://localhost:9090/foo/bar HTTP/1.1
_EXPECT . "HTTP/1\.1 200 Ok"
_EXPECT . "Hello World"
_EXPECT . "GET /foo/bar HTTP/1\.1"
__HTTP/1.1 200 Ok
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