These are all integration tests that start the server on random, unused TCP ports or Unix domain sockets. They're all designed to run concurrently with other tests to minimize test time, but tests may be run independently as well.
We write our tests primarily in Bourne shell because that's what we're comfortable writing integration tests with. This test suite is also easily portable to non-Ruby web servers.
Ruby 1.8 or 1.9 (duh!)
isolate ~> 2.1.0 - for dependencies
standard UNIX shell utilities (Bourne sh, awk, sed, grep, …)
*BSD users: use “gmake” instead of “make”
To run the entire test suite with 8 tests running at once:
To run one individual test for all concurrency models:
To run one individual test for one concurrency model:
To run all tests for one concurrency model:
You may also increase verbosity by setting the “V” variable for GNU make. To disable trapping of stdout/stderr:
To enable the “set -x” option in shell scripts to trace execution
Some of the tests are rather I/O intensive due to the rewindability requirement of “rack.input” in the Rack specification and the somewhat complicated (but awesome!) nature of the TeeInput class leading us to test it very heavily. If you have lots of RAM and a large tmpfs partition, it is advisable to set your TMPDIR and also make the t/trash/ directory a symlink to a directory inside in your TMPDIR.