Skip to content

Python-based API test automation framework for Meme API featuring pytest, Locust for performance testing, and Allure reporting. Includes functional, and load testing capabilities.

License

Notifications You must be signed in to change notification settings

summerduck/memeapi-api-test-framework-python-pytest

Repository files navigation

API Test Automation Meme

Python 3.9+ Pytest Locust Allure

🎯 Project Overview

A Python-based API test automation framework designed for testing the Meme Maker API. This framework demonstrates a robust approach to API testing, providing tools for functional, regression, and performance testing.

🌟 Key Features

  • API Testing: Comprehensive validation of API endpoints and responses
  • Load Testing: Performance evaluation using Locust
  • Rich Reporting: Detailed test reports with Allure
  • Structured Logging: Custom logging configuration
  • Data-Driven Testing: Separation of test data from test logic

🛠️ Technical Stack

Category Technology
Language Python 3.9+
Testing Framework pytest
Load Testing Locust
Reporting Allure
Version Control Git

📋 Prerequisites

  • Python 3.9 or higher
  • pip (Python package installer)
  • Git
  • Allure (for reporting)

🚀 Quick Start

  1. Clone the Repository
git clone https://github.com/Summerduck/api-test-automation-meme.git
cd api-test-automation-meme
  1. Set Up Virtual Environment
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install Dependencies
pip install -r requirements.txt
  1. Run Tests
# Run all tests
pytest

# Generate and view Allure report
allure serve test-report

# Run load tests
locust -f locustfiles/locustfile.py --host=http://167.172.172.115:52355

📊 Test Categories

Category Description Command
API Tests Functional API testing pytest
Load Tests Performance and load testing locust -f locustfiles/locustfile.py

📁 Project Structure

api-test-automation-meme/
├── data/                  # Test data files
│   └── ...  
├── endpoints/             # API endpoint definitions
│   └── ...  
├── locustfiles/           # Locust load testing scripts
│   └── ...  
├── tests/                 # Test cases
│   └── ...  
├── .gitignore
├── LICENSE
├── README.md
├── api_documentation.md   # API documentation
├── conftest.py            # Pytest configuration
├── pytest.ini             # Pytest settings
├── requirements.txt       # Python dependencies
├── rlogger.py             # Custom logging configuration
└── test-report/           # Allure test reports

🎯 Highlights

  • API-focused Architecture: Purpose-built for API testing
  • Clean Code: Maintainable, well-documented test suites
  • Performance Testing: Built-in capabilities for load testing
  • Detailed Reporting: Comprehensive test result visualization

🔜 Future Enhancements

  • Docker containerization
  • Jenkins CI/CD integration
  • Security testing integration
  • Extended performance metrics

📝 Author

Darya Samardak - LinkedIn - GitHub

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Python-based API test automation framework for Meme API featuring pytest, Locust for performance testing, and Allure reporting. Includes functional, and load testing capabilities.

Topics

Resources

License

Stars

Watchers

Forks

Languages