5 ms·
Show HN: Generate pytest API tests from an OpenAPI spec
Hi HN,
I built a tool that generates pytest API tests from an OpenAPI spec.
You can paste an OpenAPI URL and it generates a baseline pytest suite that hits each endpoint.
Live demo:
https://openapi-test-generator.vercel.app/ https://openapi-test-generator.vercel.app/
GitHub:
https://github.com/ryancrandall801/openapi-test-generator https://github.com/ryancrandall801/openapi-test-generator
- testforge 7mo agoHappy to answer questions about how it works internally. Right now the generator parses the OpenAPI spec, extracts endpoints/methods, and creates pytest tests using the requests library. The generated tests include basic status code assertions, but I'm experimenting with adding schema validation and better parameter coverage. One thing I'm curious about: how people currently bootstrap API tests when starting a new service.