michael@0: This is a regression tester for http. michael@0: michael@0: The summary michael@0: =========== michael@0: michael@0: 1) start the server, with python server.py michael@0: 2) Get a file of all tests available by getting http://localhost:8000/ michael@0: 3) Use that file as an argument to mozilla -f (this requires either a michael@0: debug build or a build with --enable-perf-metrics) michael@0: 4) Look at the results of http://localhost:8000/id/report michael@0: michael@0: Detail michael@0: ====== michael@0: michael@0: Each run gets a unique ID number, which is used to map a test run to a michael@0: database of results. Every test (which lives in the tests/ directory) is michael@0: enumerated in step 2. Adding a new test is as simple as just creating the michael@0: directory and addiing the appropriate files. michael@0: michael@0: Test format michael@0: =========== michael@0: michael@0: Each test must have a config file, which is simply a list of all the files michael@0: which will be requested, in order. Each file (x) can either be present in michael@0: the directory as that name, in which case the contents will be sent to the michael@0: browser, or as x.headers and (optionally) x.body. michael@0: michael@0: The headers file has a first line which is the response code, and then any michael@0: subsequent lines are header: value pairs. If the body file is not present, michael@0: the test server will construct a one line response. This is useful for michael@0: testing mozilla's response to headers (see the responses/ subdirectory of michael@0: tests for examples) michael@0: michael@0: Advanced tests michael@0: ============== michael@0: michael@0: The default definition of a tests's 'success' is that all the files are michael@0: retreived in the correct order. This can be overridden on a per test michael@0: basis. For example, the referer test additionally checks that a michael@0: referer header was sent. michael@0: michael@0: To do this, a file called tester.py must exist in the test's directory. michael@0: This class must provide an object called tester, which is used by the michael@0: driver code instead of the default tester. This default tester is michael@0: automatically present in the file's namespace under the name 'BaseTester'. michael@0: This means that it can be inherited from in order to only override certain michael@0: functionality. michael@0: michael@0: The routines in the default tester are documented in BaseTest.py. The most michael@0: common routine which needs to be extended in verify_request. For an michael@0: example, see the referer test. michael@0: michael@0: Bradley Baetz ,