API testing
Validate.QA doesn't need an OpenAPI spec to test your API. As the agent explores your app, it captures the calls your UI actually makes, learns each endpoint's payload shape and auth, then writes Playwright API tests that chain them in the right order.
Mechanism: Sequence-aware generation from captured network traffic: normalized endpoints and request/response shapes drive Playwright request-fixture tests with status and body assertions..
The problem: API tests are usually written by hand, separately from UI tests, and quietly drift out of sync as the backend changes. Without seeing real traffic you end up guessing at payload fields, headers, and how auth is actually carried. Spec-driven generators only cover what's documented — they miss undocumented endpoints and the real call sequences your app depends on. Stateful flows (create then read then delete) need IDs and tokens threaded between requests, which static fixtures rarely model correctly.
Observe real traffic — While the agent explores your UI, every request and response that flows through the page is captured — method, path, headers, status, and body. URLs under /api/, GraphQL endpoints, and JSON responses are flagged as API calls, and auth is detected from the live request: a Bearer Authorization header is recorded as header auth, a session/JWT cookie as cookie auth. This is real traffic from real flows, never a guess from a schema.
Normalize endpoints — Captured paths are normalized into stable patterns: UUIDs, numeric IDs, MongoDB ObjectIds, and CUID/nanoid segments collapse to :id, so /api/orders/4850 and /api/orders/clf2x9a0z1 both map to GET /api/orders/:id. Calls are grouped by method and pattern and merged across runs into a project-level endpoint map that tracks how often each endpoint was seen, which success and error statuses it returned, and whether it requires auth.
Extract payload shapes — For every call, the JSON request and response bodies are reduced to a field-level shape — key names and value types, including nested objects and arrays — rather than storing raw data. Response shapes are kept per status code and merged across observations, so generated tests can assert on fields the API genuinely returns instead of properties someone hoped were there.
Sequence into dependency chains — API calls are read back in the exact chronological order they happened during exploration, which exposes their dependencies: authenticate, create a resource, read it back, delete it. Tests are built as a shared-state chain where the token from login and the ID from a POST carry into the GET, PUT, and DELETE that follow — IDs are extracted from responses, never hardcoded blindly.
Generate request-fixture tests — Tests are emitted as native Playwright specs using the request fixture (no browser, no page). The stateful happy-path chain runs as test.describe.serial so steps execute in order and share state; independent validation cases (401, 404, 400) run as a plain test.describe so one failure never skips the rest. Each test pairs a status assertion with a body assertion drawn from the captured response shape — status-only checks are not enough.
Run, verify, and self-heal — Specs run headless in the same suite and CI as your UI tests, fast because there's no browser to drive. When a test fails, the system classifies each sub-test: a test-side mistake (wrong status, changed field name, bad auth format) is fixed automatically, while a genuine backend defect — a 500 on valid input, an auth bypass, a 404 on a known endpoint — is flagged as an app bug and quarantined rather than silently rewritten to pass.
Open API testing · Get Started Free