Unit tests
Content
0. Set Up
Make sure that you have followed the steps 0-4 in Development.
1. Set Environment Variables
Go to the folder: Code/BackendAPI/
.
Environment variables for unit tests must be defined in: tests/unit/unit_tests.env
.
See section configuration in Development.
Add the additional required values:
Variable | Description | Example |
---|---|---|
TEST_URL_SCHEMA | URL scheme | http |
TEST_URL_HOST | URL host name | localhost:7071 |
TEST_BASE_URL | Base URL | /api/v1 |
2. Execute unit tests
# Windows
.\make.ps1 -UnitTests
# Console
python -m pytest --envfile ./tests/unit/unit_tests.env tests/unit