--
MikealRogers - 04 Apr 2006
Running HTTP Test scripts and suites
Running an indivual test script
Each HTTPTest script has the python statement;
'if __name__ == "__main__"'
so that it can be executed as a stand along script. So the simplest way to run a test script is:
$python cosmo_basicquery.py
Each cosmo test script is run with the following default options:
- Host = localhost
- Port = 8080
- Path = /cosmo
- Debug = 0
These options can all be set during the script run:
$python cosmo_basicquery.py host=192.168.0.12 port=80 path= debug=1
Notice that the path should be set to nothing if all paths should be / .
The default debug level, 0, will only output failures to stdout. Setting the debug level to 1 or higher will output all the successful tests as well.
Running the cosmo test suite
The script cosmo_fullsuite will execute all the current cosmo test scripts in one bundled suite. The test suite script has the same defualt options as the indivual test script executions do with one extra option, mask. The defualt mask is 1, setting the mask > 0 will suppress all output from the indivual test scripts so that the only output from the suite run is the full failure report at the end. Running the suite is exactly the same as running the test scripts:
$python cosmo_fullsuite.py host=192.168.0.12 port=80 path= debug=1
In this case, setting debug to 1 will output all successful and failing test cases at the end of the suite. Since mask is still set to 1 the individual test scripts won't output anything.
If for some reason you want to see the output of the individual test scripts you can set the mask during execution:
$python cosmo_fullsuite.py mask=0 debug=1
What ever the debug value is set to for the suite will also be set for the individual test scripts.