Simple HTTP API testing example using python 3.9 and pytest
Execute in the terminal:
./install.sh
- SERVICE_URL - testing service URL, for e.g. http://localhost:3000
- USE_MOCK - boolean parameter for enabling/disabling request mocking
You can change it inside framework/config.py
file or via environment variable:
export SERVICE_URL="http://localhost:3000"
export USE_MOCK="False"
- With mocks (default parameter from
framework/config
):
pytest
- Without mocks:
USE_MOCK="False" pytest
- Another API URL:
SERVICE_URL="http://localhost:3000" USE_MOCK="False" pytest