Hacker News new | ask | show | jobs
How do you test multiple API payloads and edge cases?
2 points by freetimeparadox 184 days ago
I’m building a mobile app and need to reliably test different API payloads and failure scenarios. Ideally, I want to switch between payload variations on the fly and immediately see how the UI reacts. I’ve used Charles and some in-code mocks, but these approaches don’t scale well for dozens of repeatable scenarios.

How do you typically handle this? Mock servers, custom tooling, contract tests, or something else? I’m looking for practical workflows that let you test a wide range of payload variations without adding temporary test logic into the client code.

1 comments

schemathesis: Schemathesis - Property-based API Testing for OpenAPI and ... Schemathesis.io https://schemathesis.io
That looks interesting. I will give it a try.
Schemathesis author here. Feel free to open an issue if something does not work as you expect :)

As a side note, if you'd like to check what is covered by Schemathesis or any other testing tool or manual tests, you may want to try https://demo.tracecov.sh/ which will generate API coverage reports from many popular formats (there is also a CLI proxy for cases when there is no direct integration)