Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 1000 Bytes

README.md

File metadata and controls

41 lines (26 loc) · 1000 Bytes

API Testing Project with Behave and Requests

This project demonstrates API testing using Python's Behave BDD framework together with the requests library.


🚀 Features

  • API Client using requests.Session for 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-test

This 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.