WBox is a simple HTTP Testing Tool written in ANSI C which works on a POSIX system like Linux. Windows systems are not supported and compiles on a MacOS X system. It is a 20 Kb zip file which has code written in ANSI C. We can use it to perform many different tasks which include
- Benchmarking how much time it takes to generate content for your web application.
- Web server and web application stressing.
- Testing virtual domains configuration without the need to alter your local resolver.
- Check if your redirects are working correctly emitting the right HTTP code.
- Test if the HTTP compression is working and if it is actually serving pages faster.
- Use it as a configuration-less HTTP server to share files! (see the server mode documentation at the end of the Wbox tutorial in this page, but it's as simple as % wbox servermode webroot /tmp)
Download WBox version 2
There are two modes of usage, one is HTTP Client mode and the other is Server mode.
HTTP Client Mode
The way to use WBox is through command line. For example, an url
% wbox www.technogears.blogspot.com
works simply as a ping utility. We can limit the number of ping like requests by adding the number of requests as one parameter.
Timesplit Option
We can get the time information for different parts of the document using the Timesplit option.
Eg: %wbox www.digg.com timesplit 1
WBOX digg.com (64.191.203.30) port 80
0. 200 OK 44134 bytes 1326 ms
[0] 0-4095 -> 728 ms
[1] 4096-8191 -> 254 ms
[2] 8192-12287 -> 16 ms
[3] 12288-16383 -> 17 ms
[4] 16384-20479 -> 225 ms
[5] 20480-24575 -> 12 ms
[6] 24576-28671 -> 16 ms
[7] 28672-32767 -> 18 ms
[8] 32768-36863 -> 16 ms
[9] 36864-40959 -> 16 ms
[10] 40960-44133 -> 8 ms
Stressing servers and apps
We can make concurrent multiple requests using the clients number option parameter. Wbox will spawn the required number of processes, and every process will perform a query every second.
% wbox http://localhost clients 4
WBOX localhost (127.0.0.1) port 80
0. 200 OK 9939 bytes 14 ms
0. 200 OK 9939 bytes 22 ms
0. 200 OK 9939 bytes 26 ms
0. 200 OK 9939 bytes 31 ms
1. 200 OK 9939 bytes 4 ms
1. 200 OK 9939 bytes 7 ms
1. 200 OK 9939 bytes 7 ms
1. 200 OK 9939 bytes 4 ms
2. 200 OK 9939 bytes 4 ms
2. 200 OK 9939 bytes 6 ms
2. 200 OK 9939 bytes 10 ms
2. 200 OK 9939 bytes 3 ms
user terminated
Testing HTTP Compression
We can test a web server which acceps HTTP compression requests with the compr option. WBox includes the header to accept the gzip/deflate data encoding. It will be useful to compare the performance with and without compression.
HTTP Server Mode
WBox adds a feature of running a simple configuraitonless HTTP server. This is very useful in LAN or a network so that files can be easily shared. To start in server mode, you need to run
% wbox servermode webroot /tmp/shared
Try connecting http://localhost:8081. WBox uses 8081 port by default and can be changed using serverport portno option
Feel free to try this simple testing tool. It has the disadvantage of not being compatible with windows OS as many users use windows os's.