Coverage testing
Latest test coverage results
See the Jenkins nova-coverage project for the most recent test coverage results.
Generating your own coverage reports
To generate your own coverage tests, you need to have the following Python packages installed:
nosexcover (for XML output, used by Hudson/Jenkins, see below)
To generate a coverage report to standard out, do:
./run_tests.sh --with-coverage --cover-package=nova
To generate HTML reports, after running the tests, do:
coverage html -d covhtml -i
The reports will be generated in covhtml.
(The -i is needed because otherwise coverage will abort if it can't find the source for a while, and there is a dynamically generated Python file called DynamicallyCompiledCheetahTemplate.py that is no longer present when the coverage HTML report is generated).
If you want to generate test coverage reporting in a Hudson/Jenkins task, install the Cobertura plugin into Hudson/Jenkins, and generate the XML output by doing:
./run_tests.sh --with-coverage --cover-package=nova --with-xcoverage
It will generate the XML output in nova/tests/coverage.xml