Tests
The scenarios a version must pass, drafted or written, and the runs that check it before your users see it.
GET/v1/deployments/{deployment_id}/test-runsPast test runs.
Request3 fields
Path
deployment_idstringrequiredThe deployment's id (dep_...). The /v1/deployments routes also take its name.
- Type
string
Query
limitintegerHow many items per page, 1 to 100. Default 20.
- Type
integer
cursorstringWhere to go on from: the next_cursor of the page before, unchanged. Absent: the first page.
- Type
string
Answers 2002 fields
dataobject[]The items on this page.
idstringThe test run's id.
- Example
trun_8f2k
object"test_run"Always test_run.
- Type
"test_run"
deployment_idstringThe deployment it tests.
- Type
string
versionintegerThe version it tests.
- Type
integer
status"queued" | "running" | "passed" | "failed" | "error"queued or running while it plays. passed: every scenario passed. failed: one or more did not. error: it could not finish, as error_code says.
- Type
"queued" | "running" | "passed" | "failed" | "error"
error_codestring | nullWhy it ended in error: interrupted (a restart stopped it too often), test_wallet_empty, judge_unreadable (the grader's answer could not be read) or internal. Null otherwise.
- Type
string | null
scenario_countintegerHow many scenarios it plays.
- Type
integer
passed_countintegerHow many have passed so far.
- Type
integer
resumesintegerHow many times a restart interrupted it and it played on from where it was, at most 2.
- Type
integer
promotedobject | nullWhat its pass promoted, for an apply that promotes after its tests; null when it promoted nothing (none asked, refused, or it did not pass).
mode"live" | "test"The mode the version went live in.
- Type
"live" | "test"
versionintegerThe version that went live.
- Type
integer
became_defaultbooleanTrue when that promotion made the deployment the company's default: an ask with no deployment now reaches it.
- Type
boolean
cost_usdnumberWhat the run cost, in billed US dollars.
- Type
number
created_atstringWhen it was asked for, as an ISO 8601 date and time in UTC.
- Type
string
started_atstring | nullWhen it began to play; null while queued.
- Type
string | null
finished_atstring | nullWhen it ended; null while it plays.
- Type
string | null
resultsobject[]may be absentEach scenario's result, on GET /v1/test-runs/{test_run_id}; absent in lists.
object"test_result"Always test_result.
- Type
"test_result"
scenario_idstring | nullThe scenario it played; null when the scenario was deleted since.
- Type
string | null
scenarioobjectThe scenario as it was played.
- Type
object
verdict"passed" | "failed" | "error"passed: every line of success met and nothing it must never do. failed: not so. error: it could not be played to the end.
- Type
"passed" | "failed" | "error"
reasonstringWhy, in a sentence or two.
- Type
string
criteriaobject[]Each line of success, graded.
- Type
object[]
must_neverobject[]Each thing it must never do, graded.
- Type
object[]
approvals_askedobject[]What Bash asked the test user's yes for, and what it said.
- Type
object[]
transcriptobject[]The conversation, line by line.
- Type
object[]
conversation_idstring | nullThe test conversation; null when it never started.
- Type
string | null
cost_usdnumberWhat playing it cost, in billed US dollars.
- Type
number
next_cursorstring | nullSend it as cursor for the next page; null on the last page.
- Type
string | null
No sample in your language for this route, so here it is over HTTP.
curl "$VESTRA_BASE_URL/v1/deployments/{deployment_id}/test-runs" \ -H "Authorization: Bearer $VESTRA_API_KEY"