Running tests
Instructions on how to run all existence tests.
Server unit tests
Initial steps
- Install necessary Python dependencies:
pip install -r GeniFlow/requirements/testing.txt
Running tests
- Python tests
python manage.py test --settings geniflow.settings.testing geniflow/apps
If you want to get a code coverage report, run the next command:
coverage run manage.py test --settings geniflow.settings.testing geniflow/apps
Debugging
- Run
server: tests
debug task in VSCode - If you want to debug particular tests then change the configuration
of the corresponding task in
./vscode/launch.json
, for example:{ "name": "server: tests", "type": "python", "request": "launch", "justMyCode": false, "stopOnEntry": false, "python": "${command:python.interpreterPath}", "program": "${workspaceRoot}/manage.py", "args": [ "test", "--settings", "geniflow.settings.testing", "geniflow/apps/core", ], "django": true, "cwd": "${workspaceFolder}", "env": {}, "console": "internalConsole" }