Skip to content

Running tests

alessandrofg edited this page Sep 22, 2013 · 3 revisions

First of all, you have to install the dependencies of the testing framework. In path/to/owtf/tests/ there is a small script to achieve this task: install_testing_dependencies.sh.

run_tests.py

To run the tests you will use the run_tests.py script. The options for this script are:

  • -h/--help. Shows a help message.
  • -a/--all. Runs all the tests.
  • -m TestsClassName. Looks for the class TestClassName and runs all its tests. This options accepts a comma-separated list of classes.
  • -o path/to/file. Runs the tests contained in the specified file. This option accepts a comma-separated list of paths.
  • -c, --with-coverage. Tell the runner to perform test coverage analysis. Onli compatible with the -a/--all option.
  • plugin|framework|testing_framework. The tests are separated in three categories: plugin, framework and testing_framework. To run only one category, specify one of the options. Example: "run_tests.py plugin" will run all the tests for the plugins.

Other files

  • If the coverage option is enabled, the coverage report will be written to path/to/owtf/tests/cover/ in HTML format.
  • After running the tests, there will be a results report in path/to/owtf/tests/tests.log.html in HTML format. If some tests are failing, the information about the stdout, logging and errors will be available in this report.
Clone this wiki locally