This repository contains a comprehensive set of tests for various aspects of the RTP platform, including functional tests, BDD tests, UX tests, performance tests and fuzz tests. These tests are implemented using Python and appropriate libraries for each type of testing.
git clone https://github.com/your-repo/platform-testing-repo.git
cd platform-testing-repo
It's recommended to use a virtual environment to manage dependencies.
- Create virtual environment:
python3 -m venv .venv
- Activate the virtual environment:
source .venv/bin/activate
- Upgrade pip:
pip install --upgrade pip
- Install local packages:
pip install -r requirements.txt
- Install common dependencies:
pip install -e .
Each test type has its own requirements.txt file. You can install dependencies for individual test types using the following commands:
pip install -r functional-tests/requirements.txt
pip install -r bdd-tests/requirements.txt
pip install -r ux-tests/requirements.txt
pip install -r performance-tests/requirements.txt
pip install -r contract-tests/requirements.txt
Functional tests verify the basic functionality of the platform. We use pytest for writing and running these tests.
- Location: functional-tests/
- Tool: pytest
- Configuration: pytest.ini
- Command to run:
pytest functional-tests/tests/
BDD (Behavior-Driven Development) tests are written using behave, which allows defining scenarios in Gherkin syntax to describe user behaviors and expectations.
- Location: bdd-tests/
- Tool: behave
- Feature files: bdd-tests/features/
- Step definitions: bdd-tests/steps/
- Configuration: behave.ini
- Command to run:
behave bdd-tests/features/
UX tests validate the user experience and interaction flow using Playwright for browser automation.
- Location: ux-tests/
- Tool: Playwright
- Configuration: playwright.config.py
- Command to run:
pytest ux-tests/tests/
Performance tests help evaluate how the platform performs under heavy performance or high traffic using Locust.
- Location: performance-tests/
- Tool: Locust
- Configuration: locustfile.py
- Command to run:
locust -f performance-tests/locustfile.py --headless --users 5 --spawn-rate 1 --run-time 10 --host=http://example.com
Contract tests use Schemathesis to generate random input values to test the adhesion to OpenAPI specification of the service.
- Location: contract-tests/
- Tool: Schemathesis
- Command to run:
pytest contract-tests/*.py --disable-warnings --alluredir allure-results