HTTEST(1)

✨ HTTEST ✨

okay bestie, so this is the manual page for httest β€” a User Commands situation, and honestly? it's giving "I test web stuff for a living and I'm not sorry about it." πŸŽ€


πŸ’– NAME πŸ’–

httest β€” test HTTP driven application. that's it, that's the whole job. she tests HTTP-driven applications and she does it well. πŸ’…


🌸 SYNOPSIS 🌸

httest [OPTIONS] scripts

that's the shape of it: some OPTIONS, then your scripts. simple. elegant. slay. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so httest is a script based tool for testing and benchmarking web applications, web servers, proxy servers and web browsers. like, all of them. no cap. πŸ’―

and here's the part that's highkey iconic: httest can emulate clients and servers in the same test script. same. script. which is very useful for testing proxys. yes proxys, that's what it says, don't look at me, I don't make the spelling rules around here. 🫢


πŸ’… OPTIONS πŸ’…

one bullet per flag, no skips, no shortcuts, we eat the whole menu:

  • -V, --version β€” Print version number and exit. short, sweet, gone. πŸ‘‹
  • -h, --help β€” Display usage information (this message). it's literally this. hi. 🌈
  • -n, --suppress β€” do no print start and OK|FAILED. that's the original wording bestie, I'm not touching it, but yeah: it suppresses the start and the OK|FAILED lines. 🀫
  • -s, --silent β€” silent mode. the quietest of girls. πŸ™ˆ
  • -e, --error β€” log level error. only the errors get to speak. 😭
  • -i, --info β€” log level info. ✨
  • -d, --debug β€” log level debug for script debugging. πŸ”
  • -p, --debug-system β€” log level debug-system to log more details. more details. MORE. 🧚
  • -L, --list-commands β€” List all available script commands. πŸ‘‘
  • -C, --help-command β€” Print help for specific command. just the one you're beefing with. πŸ’œ
  • -t, --duration β€” Print test duration. clock it. ⏱️
  • -T, --timestamp β€” Time stamp on every run. πŸ•°οΈ
  • -S, --shell β€” Shell mode. 🐚
  • -S, --shell β€” Shell mode. 🐚 (yes. she's here twice. the manpage said it twice and I am nothing if not faithful to the source. periodt.)
  • -D, --define β€” Define variables. πŸŽ€
  • -l, --log-thread-number β€” Show the thread number for every printed line. so you always know which thread is yapping. 🧡
  • -b, --color β€” Colored output. rainbow mode activated 🌈πŸ”₯

πŸ“ SCRIPTS πŸ“

httest is script based. meaning: no script, no vibes, no test. 😌

the following script examples can be but into a scripte i.e. sample.htt and can be called like

httest sample.htt

(again: "but into a scripte" is the original's exact energy and I refuse to correct her. she's perfect. πŸ’€)


🧚 SIMPLE SCRIPT 🧚

Get a page and do expect return code 200 OK. the classic. the blueprint. the main character move. πŸ‘‘

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

βœ‚οΈ 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. it's giving "steal her host, use her host." 😌

CLIENT
_REQ www.google.ch 80
__GET /search?q=apache HTTP/1.1
__Host: www.google.ch
__
_MATCH body '\<a href="http://([^\/]*)/" class=l\>Welcome! - The \<em\>Apache\</em\> HTTP Server Project' APACHE_HOST
_WAIT

_REQ $APACHE_HOST 80
__GET / HTTP/1.1
__Host: $APACHE_HOST
__
_WAIT
END

🌈 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. (yes "communicat." she said what she said. πŸ’…)

This is a very basic selfcontained test you can run on any maschine. πŸ–₯️✨

CLIENT
_REQ localhost 8080
__GET /foo HTTP/1.1
__Host: localhost
__
_WAIT
END

SERVER 8080
_RES
_EXPECT headers "/foo"
_WAIT
__HTTP/1.1 200 OK
__Content-Length: AUTO
__
__Hello World
END

πŸ”’ SSL SCRIPT πŸ”’

Of course SSL do also work with httest, just put "SSL:" before port. that's the whole trick. go off, queen. πŸ‘‘

CLIENT
_REQ localhost SSL:8080
__GET /foo HTTP/1.1
__Host: localhost
__
_WAIT
END

SERVER SSL:8080
_RES
_EXPECT headers "/foo"
_WAIT
__HTTP/1.1 200 OK
__Content-Length: AUTO
__
__Hello World
END

⭐ EXAMPLES ⭐

look at her go:

httest script.htt
httest -Ts script.htt

two whole moods. -T and -s living their best combined life. 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Written by Christian Liesch. thank you for your service, king. 🫑


😭 REPORTING BUGS 😭

Report bugs to http://sourceforge.net/projects/htt

bestie if something breaks, tell the sourceforge, not me, I'm just the messenger with the good hair. πŸ’β€β™€οΈ

Copyright Β© 2006 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

like NO warranty. none. zero. nada. if it eats your config, that's between you and the universe. πŸ˜­πŸ’€

and that's the whole page, bestie β€” every flag, every script, every warning, all of it. nothing skipped, nothing invented, just vibes + facts. iykyk. πŸŽ€

httest 2.4.23 β€” February 2025 β€” mwah, kisses, go run your tests πŸ’‹βœ¨πŸ¦‹

πŸ“¦ where this page comes from