Automated API testing framework for RestfulBooker built with Python, pytest and requests.
- Complete CRUD testing for Booking endpoints
- Authentication and token management
- Positive and negative test scenarios
- Schema validation using Pydantic
- Data validation and business rules checks
- HTML test reporting with pytest-html
- Modular and maintainable architecture
- CI/CD pipeline with GitHub Actions
- Authentication tests (valid & invalid scenarios)
- Booking CRUD tests (create, read, update, partial update, delete)
- Negative tests (missing fields, invalid credentials, non-existent resources)
- Schema validation tests (response structure, data types, constraints)
Total: 24 automated tests - All passing
- Python 3.11
- pytest
- requests
- pydantic
- pytest-html
- GitHub Actions (CI)
QA_API_RestfulBooker/
├── api/
│ ├── base_api.py # Base HTTP methods abstraction
│ ├── auth_api.py # Authentication endpoints
│ └── booking_api.py # Booking CRUD endpoints
├── schemas/
│ └── booking_schema.py # Pydantic schemas for response validation
├── tests/
│ ├── test_auth.py # Authentication tests
│ ├── test_bookings.py # Booking CRUD tests
│ └── test_schema_validation.py # Schema & data validation tests
├── reports/ # HTML test reports
├── screenshots/ # Project documentation images
├── conftest.py # Pytest fixtures
├── pytest.ini # Pytest configuration
└── requirements.txt # Dependencies
- Clone the repository
git clone https://github.com/arturdmt-alt/QA_API_RestfulBooker-.git
cd QA_API_RestfulBooker- Create and activate virtual environment
python -m venv venv
venv\Scripts\activate # Windows- Install dependencies
pip install -r requirements.txtRun all tests:
pytest -vRun with HTML report:
pytest -v --html=reports/report.html --self-contained-htmlRun a specific test file:
pytest tests/test_auth.py -vAll tests run automatically on every push via GitHub Actions:
The pipeline:
- Runs on Python 3.11
- Executes all 24 tests
- Generates HTML reports
- Validates code on every commit
- 24/24 tests passing
- CI pipeline green
- Full HTML report available in
reports/report.html
Artur Dmytriyev
QA Automation Engineer

