This project demonstrates API testing using Python's Behave BDD framework together with the requests library.
- API Client using
requests.Sessionfor efficient HTTP calls - Reusable BDD Steps with clear separation of concerns
- Response validation with Python dataclasses
- Flexible environment configuration (dev, stage, prod)
- Detailed request/response logging for better debugging
⚙️ Setup
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt🧪 Running Tests
behave🐳 Use Docker to run the local API client:
docker run -d -p 56733:80 litovsky/flask-api-testThis command will start the API service in a Docker container, exposing port 56733 on your machine.
You can verify it by opening: http://localhost:56733 in your browser or via API requests.