OpenAPI โ pytest ยท $99 fixed
Your OpenAPI spec is lying. Find out where.
Send me your OpenAPI 3.x or Swagger 2.0 spec. Within 24 hours you get a runnable pytest contract suite, one test module per documented operation.
Order the suite โ $99One-time payment through LemonSqueezy. After checkout I contact you at the order email to get the spec.
What is in the zip
tests/test_<operationId>.pyfor every operation in the spec. Each asserts the documented success status.- For secured operations, a second test that sends no credentials and expects 401 or 403.
atg_client.py, a stdlib-only HTTP client. No dependency besidespytest.conftest.pyand aREADME.mdthat says what was and was not verified.
How the spec gets caught lying
Documented behaviour becomes assertions. Point the suite at your API and every place where the spec and the server disagree turns into a failing test:
pip install pytest ATG_BASE_URL=https://api.yourcompany.com \ ATG_API_TOKEN=... \ ATG_DRY_RUN=0 python3 -m pytest tests/ -q
Credentials come from environment variables. Nothing secret is written into the files.
See a real one before you pay
The generator ran on the public Swagger Petstore OpenAPI 3 spec: 19 operations, one test module each, plus the client and README. The full output is in the repo, so you can run it yourself:
git clone https://github.com/arsenhambardzumyan/openapi-pytest-suite cd openapi-pytest-suite/example pip install pytest python3 -m pytest tests -q # 19 passed, 9 skipped (dry run, no network)
Honest limits
- It covers documented behaviour only: the success status and, where the spec declares security, the missing-credentials rejection. Your business logic needs your own tests.
- The out-of-the-box run is a dry run with no network. It proves the suite matches the spec, not that your API does. The live run is where mismatches show up.
- I do not take secrets. Do not send API keys or tokens.
- Specs I cannot parse strictly are not delivered as a guess. I tell you what is wrong with the spec.