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:

VariableDescriptionExample
TEST_URL_SCHEMAURL schemehttp
TEST_URL_HOSTURL host namelocalhost:7071
TEST_BASE_URLBase URL/api/v1

2. Execute unit tests

# Windows
.\make.ps1 -UnitTests
# Console
python -m pytest --envfile ./tests/unit/unit_tests.env tests/unit