Run generated API tests
qa_run_apiGenerates and executes deterministic API tests from OpenAPI specs against a stage environment, covering contract, authz, robustness, and performance checks. Respects read-only policies by skipping disallowed mutations.
Instructions
Generates deterministic tests from OpenAPI and executes them against stage: contract (status declared in the spec + response body matches its schema), authz (secured endpoint called without a token must answer 401/403), robustness (malformed required parameter must answer 400/404/422), and perf (policy.maxResponseMs). Any 5xx is an unconditional critical failure. IMPORTANT: while policy.readOnly is true, every mutating endpoint (POST/PUT/PATCH/DELETE) is skipped unless its path is listed in policy.allowedMutationPaths — call qa_discover to see exactly what was skipped. Returns a digest; the full run is stored under artifactsDir.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | Auth role from qa.config.json used for authenticated calls. Defaults to the first configured role. | |
| services | No | Limit to these service names. | |
| pathContains | No | Only test operations whose path contains this substring, e.g. "/api/orders". |