Automated API testing for https://jsonplaceholder.typicode.com/
This project automates testing for common REST operations. Python 3.5+ is required.
# conda env create -f python_3_13_environment.yml
# conda activate py313
# pip install -f requirements.txt
# pytest
Warning: the built image is 1.7GB
# docker build -t api-tester .
# docker run --rm api-tester
# cd docs
# make html
Auto generated code documentation can be view in docs/_build/index.html
A test report from the last pytest run can be found at reports/report.html
Business logic for the common REST actions are in actions/user_actions.py The actual tests for Create, Update, and Delete type operations on the /users routes are in tests/test_users.py The logger utility configuration is in utils/logger.py The dataclass representation of a Users's properties is in models/models.py
- Create instances of data classes using dicts to deserialize for known tests.
- Incorporate redis for a large DB cache to test performance.