Integration tests for the PTSS-Support app microservices
To set up the development environment for this project, follow these steps:
-
Run the setup script:
python setup_vscode.py
-
Activate the virtual environment:
- On Windows:
.\.venv\Scripts\activate
- On Unix/MacOS:
source .venv/bin/activate
- On Windows:
-
Install required packages:
pip install -e .
-
Restart VS Code for changes to take effect.
The configuration for the integration tests is managed through YAML files and environment variables. The default configuration file is located at configs/dev.yaml
.
You can override the default configuration by setting the following environment variables:
API_URL
: The base URL for the API.TEST_USERNAME
: The username for test login.TEST_PASSWORD
: The password for test login.API_TIMEOUT
: The timeout for API requests.
To run the tests with custom configuration, you can set the environment variables before running the tests:
export API_URL="https://custom-api-url.com"
export TEST_USERNAME="custom_username"
export TEST_PASSWORD="custom_password"
export API_TIMEOUT=60
To run the integration tests, use the following command:
pytest tests/integration -v
This will execute all the tests in the tests/integration
directory and provide a verbose output.
The test reports are generated in the test-reports
directory with a timestamp. The reports include detailed information about the test execution and results.