Skip to content

berpress/python-api-tests-behave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Python api tests with Behave

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors