Skip to content

API: Running tests

Samantha Ixer edited this page May 21, 2019 · 2 revisions

Because the feature tests require the API to be running and available, you should create the environment and run the API (python3 app.py) before you run the tests.

Within a built VM, you can run the tests in the following way:

  1. pytest - this will run all of the tests
  2. pytest filename.py (e.g. pytest test_controller.py) - this will run just that specific file
  3. pytest -r A - this will run all of the tests with a nice summary of information at the end - this is useful to see exactly which tests pass or fail and to also see the output of any print statements from within the tests
  4. pytest -r A --cov-report term-missing --cov - this will also include a test coverage report

Clone this wiki locally