Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
QA interview question
Web, API & dataSeniorOccasionalTest design

How would you combine an API schema with property-based or fuzz testing?

Answer

Generate valid requests from the schema, then mutate boundaries, optional fields, encodings and structural constraints to produce targeted invalid cases. Assert protocol invariants such as no server errors for client mistakes, schema-valid responses, authorization isolation and consistent idempotency. Rate-limit the campaign, preserve seeds and minimized requests, and add important failures as deterministic regression tests.

Strong answer includes

  • generates both schema-valid and targeted invalid requests
  • asserts security and protocol invariants
  • preserves minimized failures as regression cases

Practical example

Fuzzing an OpenAPI-described endpoint with deeply nested and oversized JSON payloads triggers a 500 error instead of the expected 400 for malformed input, revealing an unhandled stack-depth exception; the minimized failing payload gets saved as a permanent regression test rather than being lost when the fuzzing campaign ends.

#api-fuzzing#property-based-testing#openapi#api-qa

Sources

OpenAPI Specification 3.2.0OpenAPI Initiative · API contracts, schemas and operation descriptionsHypothesis property-based testing documentationHypothesis · Property-based test design, generators, shrinking and reproducible counterexamplesOWASP API Security Top 10 — 2023OWASP · Authorization, authentication, resource consumption and API-specific risks