Run a test case of an agent
POSThttps://platform.docana.com/api/v1/agents/:agentId/test-cases/:testCaseId/run/
Queues the evaluation and returns immediately with a stable runId. The queued run is visible immediately; the worker atomically claims it before evaluation. The evaluation replays the eval spec steps against the agent and records per-step results. Poll GET /api/v1/agents/{agentId}/test-runs/{runId}/ to track progress and use POST /api/v1/agents/{agentId}/test-runs/{runId}/stop/ to cancel. The test case must be enabled and associated with an application. Accepts an optional JSON body { repeats?, minPassRate?, target? } to override the eval spec's own values for this run only and/or evaluate a specific branch instead of the current main draft.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 500
The test run was scheduled
Test case not runnable (wrong agent, disabled, no application) or invalid body
The API key or session is missing, expired, or malformed.
The caller is authenticated but not allowed to perform this operation.
Test case not found
Failed to schedule the test run