|
1 |
| -Alure report: |
2 |
| -$ allure serve test-report |
| 1 | +# API Test Automation Meme |
| 2 | + |
| 3 | +This repository contains a Python-based API test automation framework designed for testing the Meme Maker API. It utilizes tools such as [Locust](https://locust.io/) for load testing and [Allure](https://docs.qameta.io/allure/) for reporting. |
| 4 | + |
| 5 | +## Table of Contents |
| 6 | + |
| 7 | +- [Installation](#installation) |
| 8 | +- [Usage](#usage) |
| 9 | +- [Project Structure](#project-structure) |
| 10 | + |
| 11 | +## Installation |
| 12 | + |
| 13 | +1. **Clone the repository:** |
| 14 | + |
| 15 | + ```bash |
| 16 | + git clone https://github.com/Summerduck/api-test-automation-meme.git |
| 17 | + cd api-test-automation-meme |
| 18 | + ``` |
| 19 | + |
| 20 | +2. **Create and activate a virtual environment:** |
| 21 | + |
| 22 | + ```bash |
| 23 | + python -m venv venv |
| 24 | + source venv/bin/activate # On Windows: venv\Scripts\activate |
| 25 | + ``` |
| 26 | + |
| 27 | +3. **Install the required dependencies:** |
| 28 | + |
| 29 | + ```bash |
| 30 | + pip install -r requirements.txt |
| 31 | + ``` |
| 32 | + |
| 33 | +## Usage |
| 34 | + |
| 35 | +1. **Run the tests:** |
| 36 | + |
| 37 | + ```bash |
| 38 | + pytest |
| 39 | + ``` |
| 40 | + |
| 41 | +2. **Generate and view the Allure report:** |
| 42 | + |
| 43 | + ```bash |
| 44 | + allure serve test-report |
| 45 | + ``` |
| 46 | + |
| 47 | +3. **Perform load testing with Locust:** |
| 48 | + |
| 49 | + ```bash |
| 50 | + locust -f locustfiles/your_locust_file.py |
| 51 | + ``` |
| 52 | + |
| 53 | + Then, navigate to `http://localhost:8089` in your browser to start the load test. |
| 54 | + |
| 55 | +## Project Structure |
| 56 | + |
| 57 | +```plaintext |
| 58 | +api-test-automation-meme/ |
| 59 | +├── data/ |
| 60 | +│ └── ... # Test data files |
| 61 | +├── endpoints/ |
| 62 | +│ └── ... # API endpoint definitions |
| 63 | +├── locustfiles/ |
| 64 | +│ └── ... # Locust load testing scripts |
| 65 | +├── tests/ |
| 66 | +│ └── ... # Test cases |
| 67 | +├── .gitignore |
| 68 | +├── LICENSE |
| 69 | +├── README.md |
| 70 | +├── api_documentation.md # API documentation |
| 71 | +├── conftest.py # Pytest configuration |
| 72 | +├── pytest.ini # Pytest settings |
| 73 | +├── requirements.txt # Python dependencies |
| 74 | +├── rlogger.py # Custom logging configuration |
| 75 | +└── test-report/ # Allure test reports |
| 76 | +``` |
0 commit comments