This repository contains REST API Testing automation code using Python
The project uses:
- Python 3.9 and higher
- Pytest
- Requests
- Allure Framework for reports
- CI (GitHub actions)
Testing application:
git: https://github.com/berpress/flask-restful-api
url: https://stores-tests-api.herokuapp.com
swagger: https://app.swaggerhub.com/apis-docs/berpress/flask-rest-api/1.0.0
By using Windows Terminal, Python and pip
- Place the repository files into the directory of your choice
- Create virtual environment
py -m venv env
- Activate created virtual environment
env\Scripts\activate
- Install project's dependencies
pip install -r requirements.txt
- Install pre-commit
pip install pre-commit
- Install Allure Framework
- Install Java
- Without Allure Test report
All tests:
pytest
Positive tests:
pytest -m positive
Negative tests:
pytest -m negative
- With Allure Test report
pytest --alluredir=allure_reports
Show generated report in browser:
allure serve allure_reports