HTTP testing: headers, redaction, retries and richer checks

The HTTP testing plugin checks headers, timing, status ranges and JSONPath values, retries rate-limited calls, and keeps sensitive fields out of every record.

API suites check more than a status code and a substring. Five releases of @donobu/donobu-http-testing (1.2.0 to 1.7.0) grow what a test can check, and keep sensitive data out of everything Donobu records.

Mark a field as sensitive, and the request on the wire still carries the real value. The test and its checks also see the real value. Records, reports, triage evidence and the model see [redacted].

  • sensitive() marks a zod field; httpConfig.redact takes JSONPath rules such as $..ssn
  • expect.headers, expect.maxDurationMs, per-call timeoutMs and maxRedirects
  • Status as a code, a list, or a range such as '2xx' or '400-499'
  • textExcludes for fragments a body must not contain, and jsonPath checks on selected values
  • retry on 429 and 503, honoring Retry-After, with capped backoff
  • Real JSON Schema validation (draft 2020-12), repeated query keys sent in order, and nullable zod fields accepted
  • Checks run against the full response body; only a bounded copy is stored