- Support both functional and performance tests
- Test by parametrized input / output text files
- Use flask to mock API services dynamically with magic
- HTML report
- Common get/post/request functions to:
- Print every request and response in an API output file
- Append common headers
- Handle request exceptions and non-20X response codes, so you only need to focus on normal json response.
pip install -r Scripts/requirements.txt
cd Scripts
Start API mock services:
python flask_mock_service.py
Run Functional tests:
pytest
Run Performance tests:
python perf_test_rest_api.py
Check out the medium post for more details.
For HTML report generation, we are using pytest-html which is simple and effective.
Other alternatives to generate fancier HTML reports are Allure and reportportal. Note these report frameworks are heavy, especially reportportal.