Automated tests ¶
Pytest ¶
The tests done at a request/unit level are run via pytest-django.
To run locally, start the Devcontainer and run:
tests/pytest/run.sh
The helper script:
- Runs the tests with
pytest
- Calculates test coverage with
coverage
- Generates a
coverage
report in HTML in the app’sstatic/
directory
The report can be viewed by launching the app and navigating to http://localhost:$DJANGO_LOCAL_PORT/static/coverage/index.html
The report files include a local .gitignore
file, so the entire directory is hidden from source control.
Latest coverage report ¶
We also make the latest (from main
) coverage report available online here: Coverage report