Python test automation framework for Restful Booker Platform.
- Python 3.13+
- uv
- pytest
- httpx
- DeepDiff
- Allure Report
uv sync
uv run pytest tests/unitConfiguration is read from environment variables and represented by frozen dataclasses.
Copy the example and keep credentials in the local .env file:
cp .env.example .env.env is excluded from Git.
Start the Restful Booker backend services:
docker compose up -d
docker compose psRun the integration tests:
uv run pytest tests/integrationIntegration tests are marked with every service they require. This includes both the service under test and services
used for authentication or test data setup. For example, the Booking tests have booking, room, and auth markers.
Run the tests affected by a service change:
uv run pytest -m auth
uv run pytest -m booking
uv run pytest -m message
uv run pytest -m roomAs a result, -m room runs both Room and Booking tests, while -m auth also includes tests that require an
authentication token.
Test results are appended to allure-results, so separate test runs can be combined into one report.
To discard previous results before a new full run, use:
uv run pytest --clean-alluredirWith the Allure CLI installed, open the report using:
allure serve allure-resultsStop the services when they are no longer needed:
docker compose downuv run ruff check .
uv run ruff format --check .The Quality checks workflow runs Ruff and unit tests without starting backend services.
The Integration tests workflow starts the backend with Docker Compose, waits for every service, and runs the full
integration suite. A manual workflow run can be limited to the auth, booking, message, or room dependency
marker. Raw Allure results are retained as a workflow artifact for 14 days.