Unittests and code coverage
pSysmon is developed using methods of test driven development. The pSysmon code is tested using unittest and the nose test framework. The coverage of the source code by the unittests is determined with the coverage package. The tests are run automatically by the buildbot after code changes have been commited to the Git repository.
The results of the tests and the coverage are computed separately for the
psysmon.core and the
Running tests on local system
To run the unittest on a local system, the python packages nose, coverage and nosehtmloutput have to be installed.
To run the tests, change into the root folder of the pSysmon source distribution (the folder which holds the setup.py file) and run
nosetests with one of the provided configuration files:
nosetests_packages.cfg. The html reports will be placed in the directory
test_results/packages. You have to make shure that these directories exist before running the nosetests commands.
nosetests -c .nosetests_core.cfg
nosetests -c .nosetests_packages.cfg