Wiki
Clone wikiForeman / Foreman Testing
Foreman Testing
Please note that tests are still being written, so Foreman may have bugs. Please contact the author if you want to log a bug.
To run all tests on Foreman, please run the following command:
python run_foreman.py run_tests [path to testing config file]
The default testing config file can be found in the Foreman directory under foreman/config/test_config.ini. The tests will create a Sqlite database called foreman_test.db in the main foreman directory. As long as you have not put your database in exactly the same location, there will be no issues ;)
Optional arguments to run the tests individually are:
--test_urls True --test_unit True --test_func True
URL Testing
These tests check every URL within foreman to see if the URL returns a:
- 200 (ok)
- 404 (doesn't exist - e.g. non-existent case or task)
- 403 (user permission error)
- 401 (not logged in)
Functional Tests
Not yet implemented. These tests will check the full flow of a user interaction with foreman.
Unit Tests
Currently being written. Tests each individual function/method works as intended.
Updated