This project contains automated tests for various API endpoints using Python, Pytest, and Allure for reporting. The tests include GET, POST, PUT, PATCH, and DELETE requests.
api_test_project/
│
├── config.py
├── conftest.py
├── requirements.txt
├── .gitignore
│
├── logs/
│ └── api_tests_YYYYMMDD_HHMMSS.log
│
├── tests/
│ ├── __init__.py
│ ├── test_get_requests.py
│ ├── test_post_requests.py
│ ├── test_put_requests.py
│ ├── test_patch_requests.py
│ └── test_delete_requests.py
│
└── allure-results/
git clone https://github.com/silentstorm-nba/python-api-automation.git
cd python-api-automation
python -m venv venv
venv\Scripts\activate
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pytest --alluredir=allure-results
-
macOS:
brew install allure
-
Windows/Linux: Download the binary from the Allure installation page.
allure generate allure-results -o allure-report --clean
allure open allure-report
Logs are saved in the logs
directory with a timestamped filename (e.g., api_tests_YYYYMMDD_HHMMSS.log
).
Special thanks to jsonplaceholder.typicode.com for providing a free and easy-to-use API for testing and prototyping.