Most API testing is example-based: send X, expect Y. But bugs live in the edges — the malformed JSON, the off-by-one, the auth token you forgot to expire. API-Test-Suite-Builder generates property-based test cases that stress your API at the boundaries, automatically.
10-Second Pitch
- Property-Based Generation: Instead of writing examples, define invariants — your API must satisfy these regardless of input shape.
- Schema-Aware Fuzzing: Uses your OpenAPI spec to generate adversarial inputs that comply with types but break assumptions.
- Regression Suite Auto-Update: When your API evolves, the builder detects breaking changes and flags what needs human review.
- CI-Native: Outputs JUnit, JSON, and Slack-compatible reports. Fails builds, not production.
Setup Directions
- Point to your OpenAPI spec:
api-test init --spec ./openapi.yaml - Define your invariants in
tests/invariants.ts(e.g., "auth failures return 401, never 500"). - Run the suite:
api-test generate && api-test run - Review the flagged edge cases in
./test-reports/ - Add
api-test --watchto your CI pipeline for continuous validation.
Pros/Cons
| Pros | Cons |
|---|---|
| Catches a wider class of bugs than example-based tests | Property-based testing requires a different mindset |
| Works with any OpenAPI-compliant API | Can produce false positives on intentional edge cases |
| Generates meaningful regression reports | Setup invariant definitions take time upfront |
Verdict: The upfront investment in defining invariants pays off immediately — you'll find bugs that your example tests missed for months. Strong addition to any API-first development workflow.