Show HN: Generate pytest API tests from an OpenAPI spec(openapi-test-generator.vercel.app)
openapi-test-generator.vercel.app
Show HN: Generate pytest API tests from an OpenAPI spec
https://openapi-test-generator.vercel.app/
1 comments
Happy 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.
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.
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/
GitHub: https://github.com/ryancrandall801/openapi-test-generator