Skip to content
中文

Retrieve a test case

Code Mode: praxis.devops.testCases.retrieve

HTTP: GET /devops/v1/test-cases/{id}

Read one case in full — its steps, tags, declared owners, current state with the policy and ticket behind it, and its rolling 7 or 30 day statistics. Use it before quarantining or fixing a case, to see what the state already is and why. A case that was renamed is reachable by both its current fingerprint id and the ids listed in aliases.

Signature

praxis.devops.testCases.retrieve(args:{path:{/** e.g. "tc_9f2b1c0d8e7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b1c" */ id:string}}):Promise<{/** Fingerprint-derived case identifier that follows the case across a rename; use it for every later read or state change. e.g. "tc_9f2b1c0d8e7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b1c" */ id:string;/** The resource type of this answer, always test_case; use it to tell answers apart when several kinds are handled together. */ object:"test_case";/** RFC 3339 UTC time this case was first discovered; it is not reset by a rename. e.g. "2026-10-20T04:00:00Z" */ createTime:string;/** RFC 3339 UTC time this case's declaration or state last changed. e.g. "2026-11-02T11:30:00Z" */ updateTime:string;/** Canonical Console link for this case, for putting a human-readable reference in a card or a message. e.g. "https://console.deepraxis.com/devops/tests/cases/tc_9f2b1c0d8e7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b1c" */ viewerUrl:string;/** The project this case belongs to, from the project list or create answer. e.g. "dvp_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ project:string;/** The suite that holds this case, retrievable with a suite read for its file and framework. e.g. "tsu_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ suite:string;/** The case's current title. e.g. "praxis-devops serves /devops/v1 as REST over its one JSON-RPC face (ADR-073) › a route the table does not name is a 404" */ title:string;/** The describe/context titles enclosing the case, outermost first, which is how the case reads inside its file. e.g. ["praxis-devops serves /devops/v1 as REST over its one JSON-RPC face (ADR-073)"] */ suitePath:Array<string>;/** Distinguishes cases that share a title in one file, such as a table-driven case per row; absent when the title is unique. e.g. "GET" */ variant?:string;/** Path of the file declaring the case, relative to the repository root. e.g. "services/devops/spec/features/http-face/http-face.feature" */ file:string;/** Line in that file where the case is declared, valid for the commit that discovered it. e.g. 37 */ line:number;/** The case's declared test size, which decides its time budget and which selectors match it. e.g. "small" */ size:"small"|"medium"|"large";/** ISTQB purpose tags this case declares; a purpose-based selector matches against these. e.g. ["regression"] */ purposes:Array<"smoke"|"regression"|"acceptance"|"contract"|"performance">;/** True when the case may run against a production environment; a plan selecting prodSafeOnly keeps only these. e.g. false */ prodSafe:boolean;/** Free-form tags the case declares, matched by an anyTags or allTags selector. e.g. ["api"] */ tags:Array<string>;/** Code owners the case declares for triage routing; empty when the file names none. e.g. ["praxis-98"] */ owners:Array<string>;/** The case's declared steps as written, when the framework exposes them; absent for frameworks whose cases are code only. e.g. ["Given a recording devops service","When the caller sends \"GET\" to \"/devops/v1/projects\""] */ steps?:Array<string>;/** What recent results say about the case — flaky when it both passes and fails without a code change, broken when it has stopped passing. e.g. "healthy" */ health:"unknown"|"healthy"|"flaky"|"broken";/** RFC 3339 UTC time the current health value was set; absent while health is unknown. e.g. "2026-11-01T00:00:00Z" */ healthSince?:string;stats:{/** The trailing period these numbers cover; the counts are always relative to now, not to a catalog commit. e.g. "7d" */ window:"7d"|"30d";/** How many times the case ran in this window, counting every attempt of every run. e.g. 96 */ executions:number;/** How many of those executions failed, including failures that later passed on retry. e.g. 3 */ failures:number;/** How many executions failed and then passed on a retry inside the same run — the evidence behind a flaky health. e.g. 2 */ flakes:number;/** Failures divided by executions in this window, from 0 to 1; 0 when the case did not run. e.g. 0.031 */ failureRate:number;/** RFC 3339 UTC time of the most recent failure in this window; absent when the case did not fail. e.g. "2026-11-02T08:41:00Z" */ lastFailureTime?:string;/** How many distinct pull requests saw this case fail in this window, which is how much the failure is costing delivery. e.g. 2 */ impactedPullRequests:number};/** The case's own latest executions, at most the last 30, oldest first — the strip a test board draws per row. e.g. [{"status":"failed","flaky":false,"time":"2026-11-02T08:41:00Z","commit":"4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c"}] */ recent?:Array<{/** How this execution ended. e.g. "failed" */ status?:"passed"|"failed"|"skipped"|"pending"|"other"|"timed_out"|"cancelled";/** True when this execution failed and then passed on a retry inside the same run — the per-execution fact behind the case's flaky health. e.g. false */ flaky?:boolean;/** RFC 3339 UTC time the execution was recorded, which is what orders the strip; two executions of the same commit are told apart by it. e.g. "2026-11-02T08:41:00Z" */ time?:string;/** Full 40-hex commit sha this execution ran at; the commits the strip shows are the ones a bisect or a regression read compares. e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ commit?:string}>;state:{/** The state in force. e.g. "active" */ name:"active"|"quarantined"|"disabled"|"fixed";/** RFC 3339 UTC time this state began, which is how long an exclusion has been in force. e.g. "2026-10-30T03:00:00Z" */ since:string;/** The rule that set the state — a person acting by hand, or an automatic rule such as a failure rate or an expiring quarantine. e.g. "manual" */ policy:"manual"|"failure_rate"|"branch_flake"|"days_active"|"fixed_quiet"|"fix_attempt"|"expired";actor:{/** 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};/** Why the state was set, as recorded; absent for automatic transitions that carry no note. e.g. "flaky under parallel execution" */ reason?:string;/** The work item that owns this exclusion; a quarantine that outlives its ticket is reported as an expired exclusion. e.g. "ticket-728" */ ticket?:string;/** RFC 3339 UTC time this state lapses and the case returns to active; absent when it stays until changed by hand. e.g. "2026-12-01T00:00:00Z" */ expireTime?:string;/** The repair attempt being watched, present only while the state came from a fix attempt. */ fixAttempt?:{/** The run that attempted the repair; read it to see whether the fix held. e.g. "trn_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ run?:string;/** The commit the repair attempt ran at, which is the code the grace period is judging. e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ commit?:string;/** RFC 3339 UTC time the grace period ends and the attempt is judged. e.g. "2026-11-05T00:00:00Z" */ graceUntil?:string}};/** True when the case may never be quarantined — a safety or security check whose failure must always count; a quarantine attempt on it is refused. e.g. false */ neverQuarantine:boolean;/** Ids this case was known by before a rename, newest first; read with them to reconcile history recorded under an older title. e.g. [] */ aliases:Array<string>;/** The commit whose catalog first discovered this case; a rename does not move it, so it dates the case's real age. e.g. "c0001aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" */ firstSeenCommit:string;/** The commit after which the case was no longer discovered; absent while the case is still in the newest catalog. e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ retiredCommit?:string}>;

Parameters

NameInTypeRequiredDescription
idpathstringyesThe case identifier returned by a case list, or an older id listed in that case’s aliases.

Responses

StatusContent typesDescription
200application/jsonThe case with its state, statistics and alias ids.
401application/jsonThe API key is missing or invalid; send a valid Praxis API key in the Authorization header before retrying.
403application/jsonThe 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.
404application/jsonCASE_NOT_FOUND means no case with that id exists in this organization, or its id prefix is not a case id; list the project’s cases and use an id from that answer.
500application/jsonINTERNAL 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.