-
Support both functional and performance tests
-
Common get/post function to
- Print every request and response in a API output file
- Append common headers
- Take care of request exception and non-200 response codes and return None, so you only need to care normal json response.
-
Use flask to mock service
-
html report
pip install -U pytest requests Flask pytest-html
cd Scripts
Run Functional tests:
pytest
Run Performance tests:
python perf_test_rest_api.py
Check out the medium post for more details.