List test runs
Code Mode: praxis.devops.projects.testRuns.list
HTTP: GET /devops/v1/projects/{project}/test-runs
List the project’s runs newest first, with each run’s state, result and counts. Use it to find the run id whose executions you want to read, or to see whether a commit’s tests have finished. A run whose result is pending has not reached a verdict yet — read it again rather than treating it as passed. Filter by state or result to watch only the runs still in flight.
签名
praxis.devops.projects.testRuns.list(args:{path:{/** e.g. "dvp_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ project:string};query?:{/** e.g. 20 */ pageSize?:number;/** e.g. "pt1.eyJvIjoyMH0" */ pageToken?:string;/** e.g. "result=failed" */ filter?:string;/** e.g. "createTime desc" */ orderBy?:string}}):Promise<{/** The runs on this page, newest first. */ items:Array<{/** Run identifier used for later reads, cancellations and execution listings. e.g. "trn_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ id:string;/** The resource type of this answer, always test_run; use it to tell answers apart when several kinds are handled together. */ object:"test_run";/** RFC 3339 UTC time the run was created, which is when its selection was fixed. e.g. "2026-11-03T09:00:00Z" */ createTime:string;/** RFC 3339 UTC time the run's state or counts last changed. e.g. "2026-11-03T09:12:00Z" */ updateTime:string;/** Canonical Console link for this run, for putting a human-readable reference in a card or a message. e.g. "https://console.deepraxis.com/devops/tests/runs/trn_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ viewerUrl:string;/** The project this run belongs to, from the project list or create answer. e.g. "dvp_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ project:string;/** The plan that selected this run's cases; absent for a run created with an ad-hoc selector. e.g. "tpl_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ plan:string;/** What started this run, which is how a run is attributed back to the event that wanted it. e.g. "manual" */ trigger:"manual"|"pull_request"|"merge_group"|"promotion"|"schedule"|"retry"|"fix_attempt";ref:{/** Branch the commit was reached through, for display and attribution; it does not pin the run, the commit does. e.g. "main" */ branch?:string;/** Full 40-character commit sha the run tested, which is what its result is evidence about. e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ commit:string;/** The proposed change whose testing started this run; absent for runs started by a schedule or by hand. e.g. "pr_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ pullRequest?:string;/** Commit at the head of the group being landed together, when the run tested a merged candidate rather than one change. e.g. "5a3b0d2e9f8c7b6a5d4e3f2a1b0c9d8e7f6a5b4c" */ mergeGroupHead?:string;/** The release this run is evidence about; absent unless the run belongs to a release. e.g. "rls_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ release?:string;/** The promotion this run belongs to; absent unless the run was started to guard or observe one. e.g. "prm_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ promotion?:string};/** The environment the run executed against; absent when the run needed none. e.g. "dve_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ environment:string;/** Where the cases actually ran. e.g. "external" */ executor:"cloud"|"external";selection:{selector:{/** Keep only cases of these declared sizes; omit to allow every size. e.g. ["small","medium"] */ sizes?:Array<"small"|"medium"|"large">;/** Keep only cases carrying at least one of these purpose tags; omit to allow every purpose. e.g. ["regression"] */ purposes?:Array<"smoke"|"regression"|"acceptance"|"contract"|"performance">;/** Keep only cases from these test frameworks; omit to allow every framework. e.g. ["bun"] */ frameworks?:Array<"gherkin"|"bun"|"vitest"|"jest"|"pytest"|"go"|"playwright">;/** Keep only cases carrying every one of these tags; use it to narrow to an area without naming each case. e.g. ["devops"] */ allTags?:Array<string>;/** Keep only cases carrying at least one of these tags; use it to widen across neighbouring areas. e.g. ["api","cli"] */ anyTags?:Array<string>;/** Keep only cases in these repository packages; the package is the directory the file lives in. e.g. ["services/devops"] */ packages?:Array<string>;/** Run exactly these cases, named by id; use it to re-run a known failure without widening to its whole area. e.g. [] */ cases?:Array<string>;/** True keeps only cases declared safe to run against a production environment; use it for a plan whose environment is production. e.g. false */ prodSafeOnly?:boolean;/** Present to select only the cases a commit range can affect, the way a presubmit wants it. */ affected?:{/** The commit the change is measured against; the affected set is what changed between this commit and the run's own commit. e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ base?:string}};/** How many cases the run selected; compare it with the catalog's case count when a run looks too small. e.g. 34 */ selectedCount:number;/** Which rule produced this set — a plan's selector, an explicit list, or the affected set of a commit range. e.g. "plan" */ reason:"affected"|"plan"|"explicit";/** What the affected selection reacted to — the changed packages, files or cases; present only when reason is affected. e.g. ["packages/praxis/rpc-kit"] */ affectedBy?:Array<string>};/** How many times each selected case ran in this run; more than one means a flake can be told apart from a real failure. e.g. 1 */ repeat:number;/** How far the run has got, from being queued to being finished; finished is the only state where the result is final. e.g. "finished" */ state:"queued"|"provisioning"|"running"|"reporting"|"finished";/** The verdict. e.g. "failed" */ result:"pending"|"passed"|"failed"|"errored"|"cancelled"|"timed_out"|"no_tests";counts:{/** Executions that passed, counting a case that passed on a retry as passed. e.g. 30 */ passed:number;/** Executions that failed and counted against the run; quarantined failures are not included here. e.g. 2 */ failed:number;/** Executions that failed and then passed on a retry inside this run. e.g. 1 */ flaky:number;/** Selected executions the tool reported as skipped; they neither pass nor fail the run. e.g. 0 */ skipped:number;/** Selected executions that have not reported yet, which is why a run may still change its result. e.g. 1 */ pending:number;/** Executions reported under a status outside the known set, kept visible instead of being folded into passed or failed. e.g. 0 */ other:number;/** Failures from quarantined cases; they are recorded but do not fail the run, so they explain a failed case that did not fail the verdict. e.g. 1 */ quarantinedFailures:number};/** The external tool that produced the results, present for runs whose results arrived as an uploaded report. */ tool?:{/** Name of the tool that ran the cases, as the uploader declared it. e.g. "playwright" */ name?:string;/** Version of that tool, when the uploader declared one; absent otherwise. e.g. "1.48.0" */ version?:string};/** How many parallel pieces the run's cases were split into, which bounds how long the run takes. e.g. 1 */ shards:number;requestedBy:{/** What sort of actor this is, which decides how the id should be read. e.g. "user" */ kind:"user"|"agent"|"system";/** Identifier of the actor within its kind, such as a user id for a person. e.g. "usr_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ id:string;/** Display name for the actor at the time, so a record reads the way it did when it was written; absent when none was known. e.g. "Sean" */ label?:string};/** The earlier run this one re-runs cases from; absent unless the trigger is a retry. e.g. "trn_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ retryOf?:string;/** RFC 3339 UTC time execution actually began; absent while the run is still queued. e.g. "2026-11-03T09:01:00Z" */ startTime?:string;/** RFC 3339 UTC time the run stopped, whether it finished, failed, was cancelled or timed out; absent while it is still going. e.g. "2026-11-03T09:12:00Z" */ endTime?:string;/** Why the run was cancelled, as given by whoever cancelled it; present only for cancelled runs. e.g. "superseded by trn_01JQ8Z3M9K4V7B2N6C5X0YTRHX" */ cancelReason?:string;/** What the executor reported when the run errored; present only for errored runs, and it concerns the run, not the cases. e.g. "executor lost before reporting shard 2" */ errorMessage?:string;/** Present only when the read asked to expand failedExecutions; it lists this run's non-passed executions so a second call is not needed. */ failedExecutions?:Array<{/** The run this execution belongs to, from the run list or create answer. e.g. "trn_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ run:string;/** The case that was executed, retrievable with a case read for its declaration and state. e.g. "tc_9f2b1c0d8e7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b1c" */ case:string;/** The case's title as it read when this run executed it, which may predate a later rename. e.g. "a route the table does not name is a 404 and never reaches the service" */ title:string;/** The repository package the executed case lives in. e.g. "services/devops" */ package:string;/** Path of the file that declared the case, relative to the repository root. e.g. "services/devops/spec/features/http-face/http-face.feature" */ file?:string;/** How this execution ended. e.g. "failed" */ status:"passed"|"failed"|"skipped"|"pending"|"other"|"timed_out"|"cancelled";/** True when the case failed and then passed on a retry inside the same run — the fact behind the run's flaky count. e.g. false */ flaky:boolean;/** True when the case was quarantined at the time of the run, so its failure was recorded but did not fail the verdict. e.g. false */ quarantined:boolean;/** How long the case took in milliseconds, summed over its attempts. e.g. 412 */ durationMs:number;/** Every attempt this case took, in order; more than one is what a retry or a flake looks like. */ attempts:Array<{/** Which try this was, counting from 1. e.g. 1 */ attempt:number;/** How this try ended, using the same vocabulary as the execution it belongs to. e.g. "failed" */ status:"passed"|"failed"|"skipped"|"pending"|"other"|"timed_out"|"cancelled";/** How long this try took in milliseconds. e.g. 380 */ durationMs:number;/** The failure message for this try; absent when it did not fail. e.g. "expected 404, received 400" */ message?:string;/** Diagnostic text for this try, such as a stack trace; absent when none was reported. e.g. "at Object.<anonymous> (http-face.steps.ts:57:3)" */ trace?:string;/** RFC 3339 UTC time this try began; absent when the tool reported no timing. e.g. "2026-11-03T09:04:00Z" */ startTime?:string}>;/** The failure message the tool reported, as written; absent for executions that did not fail. e.g. "expected 404, received 400" */ message?:string;/** The step that failed, when the tool identifies one; absent for tools that report only a message. e.g. "Then the answer is HTTP 404" */ failedStep?:string;/** Stack trace or equivalent diagnostic text; absent when the tool reported none. e.g. "at Object.<anonymous> (http-face.steps.ts:57:3)" */ trace?:string;/** Files recorded as evidence for this execution, such as screenshots or reports; empty when the tool attached none. */ evidence:Array<{/** File name as the producing tool wrote it, for display when listing evidence. e.g. "http-face-404.png" */ name:string;/** Media type of the stored file, which decides whether it can be shown inline. e.g. "image/png" */ contentType:string;/** Identifier of the stored file, used to fetch its contents through the file API. e.g. "file_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ fileId:string;/** Size of the stored file in bytes. e.g. 48123 */ size:number}>;/** True when the executed case was not in the catalog at that commit, so a result exists for a case the project no longer knows; it is surfaced rather than dropped e.g. false */ uncatalogued:boolean}>;/** Present only when the run's counts cannot be trusted: they add up to more executions than the cases the run selected, which only happens when a case was counted */ countsUntrusted?:{/** What the disjoint count buckets (passed, failed, skipped, pending, other and quarantined failures) add up to; flaky is not added because it qualifies a case alr e.g. 7539 */ counted:number;/** How many cases the run selected, which is the bound the counts must fit. e.g. 7500 */ selectedCount:number;/** How many executions the counts report beyond the selection; 0 never appears here, since the field itself only appears when the counts are over. e.g. 39 */ overflow:number}}>;/** How many items match this list's project and filter across every page, so a dashboard can show a total without walking the pages. e.g. 137 */ totalSize?:number;/** Cursor for the next page; an empty string means this was the last page, which is the only signal a list is finished. e.g. "pt1.eyJvIjoyMH0" */ nextPageToken:string}>;参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| project | path | string | 是 | Identifies the project whose data you are reading, from the project list or create answer. |
| pageSize | query | number | 否 | How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone. |
| pageToken | query | string | 否 | The cursor from the previous page’s nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page. |
| filter | query | string | 否 | AIP-160 equality filter over one declared field, for example state=running or result=failed. An undeclared field is refused with INVALID_ARGUMENT; it is never ignored, so a mistyped filter cannot quietly return everything. |
| orderBy | query | string | 否 | Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource’s own order. |
响应
| 状态码 | 内容类型 | 说明 |
|---|---|---|
| 200 | application/json | One page of runs, newest first; nextPageToken is empty on the last page. |
| 400 | application/json | INVALID_PARAMS or INVALID_ARGUMENT means a field, query value or identifier violates the documented format or range — an unknown enum value, a pageSize outside 1..100, an unsupported filter or orderBy field, or an id with the wrong prefix. Correct the named input; nothing was read or written. |
| 401 | application/json | The API key is missing or invalid; send a valid Praxis API key in the Authorization header before retrying. |
| 403 | application/json | The credential carries no organization, or that organization cannot reach this project; use a key belonging to the project’s organization. No cross-organization read is possible. |
| 404 | application/json | PROJECT_NOT_FOUND means no project with that id is visible to this organization; list the projects and use an id from that answer. |
| 500 | application/json | INTERNAL means the service could not complete the request; retry once, and if it repeats report the request id. A read is safe to repeat; a write that failed this way should be re-read before it is sent again. |