Menu ▾ ▴

Home

christian liesch

INTRO

httest is a script based tool for testing and benchmarking web applications, web servers, proxy servers and web browsers. httest can emulate clients and servers in the same test script, very useful for testing proxys.

GETTING STARTED


To get a quick start here a simple example. Copy past the following script into a file "simple.htt"

CLIENT
_REQ www.google.ch 80
__GET / HTTP/1.1
__Host: www.google.ch
__
_EXPECT headers "200 OK"
_WAIT
END

and run httest with this script with the following command:

httest simple.htt

The test script gets googles root and test if we get a 200 OK. If not the script will fail else it will terminate with a OK and exit code 0.

Useful

To list all httest script commands run

httest -L

To get help for a specific script command run for example

httest -C_REQ

EXAMPLES

Automatic cookie handling. But do not handle path or stuff like that, it just sends a received cookie on a given connection. If need more features do it with _MATCH or ask for new feature ;)

CLIENT
### _AUTO_COOKIE on 
_REQ foo.bar.com 80 
__GET / HTTP/1.1 
__Host: foo.bar.com 
__Cookie: ### AUTO 
__ 
_WAIT 

__GET /bla HTTP/1.1 
__Host: foo.bar.