.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8. .TH HTTEST "1" "December 2018" "httest 2.4.23" "User Commands" .SH NAME httest \- test HTTP driven application .SH SYNOPSIS .B httest [\fI\,OPTIONS\/\fR] \fI\,scripts\/\fR .SH DESCRIPTION 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. .SH OPTIONS .TP \fB\-V\fR \fB\-\-version\fR Print version number and exit .TP \fB\-h\fR \fB\-\-help\fR Display usage information (this message) .TP \fB\-n\fR \fB\-\-suppress\fR do no print start and OK|FAILED .TP \fB\-s\fR \fB\-\-silent\fR silent mode .TP \fB\-e\fR \fB\-\-error\fR log level error .TP \fB\-i\fR \fB\-\-info\fR log level info .TP \fB\-d\fR \fB\-\-debug\fR log level debug for script debugging .TP \fB\-p\fR \fB\-\-debug\-system\fR log level debug\-system to log more details .TP \fB\-L\fR \fB\-\-list\-commands\fR List all available script commands .TP \fB\-C\fR \fB\-\-help\-command\fR Print help for specific command .TP \fB\-t\fR \fB\-\-duration\fR Print test duration .TP \fB\-T\fR \fB\-\-timestamp\fR Time stamp on every run .TP \fB\-S\fR \fB\-\-shell\fR Shell mode .TP \fB\-S\fR \fB\-\-shell\fR Shell mode .TP \fB\-D\fR \fB\-\-define\fR Define variables .HP \fB\-l\fR \fB\-\-log\-thread\-number\fR Show the thread number for every printed line .TP \fB\-b\fR \fB\-\-color\fR Colored output .SH SCRIPTS httest is script based. The following script examples can be but into a scripte i.e. sample.htt and can be called like .nf httest sample.htt .SH "SIMPLE SCRIPT" Get a page and do expect return code 200 OK. .nf CLIENT _REQ www.google.ch 80 __GET /search?q=apache HTTP/1.1 __Host: www.google.ch __ _EXPECT headers "HTTP/1.1 200 OK" _WAIT END .SH "CUT AND PAST SCRIPT" Cut and past from a HTTP stream, i.e we cut the apache host to access it in the second request. .nf CLIENT _REQ www.google.ch 80 __GET /search?q=apache HTTP/1.1 __Host: www.google.ch __ _MATCH body '\\Welcome! - The \\Apache\\ HTTP Server Project' APACHE_HOST _WAIT _REQ $APACHE_HOST 80 __GET / HTTP/1.1 __Host: $APACHE_HOST __ _WAIT END .SH "CLIENT SERVER SCRIPT" We can hold client and server in the same host. Actually multiple client and multiple server. Very useful to test forward or reverse proxies. Or a webapplication which communicat itself with third party servers i.e. mail server. This is a very basic selfcontained test you can run on any maschine. .nf CLIENT _REQ localhost 8080 __GET /foo HTTP/1.1 __Host: localhost __ _WAIT END SERVER 8080 _RES _EXPECT "/foo" _WAIT __HTTP/1.1 200 OK __Content-Length: AUTO __ __Hello World END .SH "SSL SCRIPT" Of course SSL do also work with httest, just put "SSL:" before port. .nf CLIENT _REQ localhost SSL:8080 __GET /foo HTTP/1.1 __Host: localhost __ _WAIT END SERVER SSL:8080 _RES _EXPECT "/foo" _WAIT __HTTP/1.1 200 OK __Content-Length: AUTO __ __Hello World END .SH EXAMPLES httest script.htt .PP httest \-Ts script.htt .SH AUTHOR Written by Christian Liesch .SH "REPORTING BUGS" Report bugs to http://sourceforge.net/projects/htt .SH COPYRIGHT Copyright \(co 2006 Free Software Foundation, Inc. .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.