MCPcopy Create free account
hub / github.com/TestSprite/testsprite-cli / getRun

Method getRun

src/lib/http.ts:368–383  ·  view source on GitHub ↗

* GET /api/cli/v1/runs/{runId} * Fetch the current state of a run. When `waitSeconds` is provided * (1–25) the server performs a bounded long-poll and returns when the * run is terminal or when `waitSeconds` elapses, whichever comes * first. On `400 VALIDATION_ERROR` (server doesn't supp

(
    runId: string,
    options?: { waitSeconds?: number; includeSteps?: boolean; signal?: AbortSignal },
  )

Source from the content-addressed store, hash-verified

366 * identical to the M3.3 summary shape — the polling path is unaffected.
367 */
368 async getRun(
369 runId: string,
370 options?: { waitSeconds?: number; includeSteps?: boolean; signal?: AbortSignal },
371 ): Promise<RunResponse> {
372 const query: Record<string, number | boolean | undefined> = {};
373 if (options?.waitSeconds !== undefined) {
374 query.waitSeconds = options.waitSeconds;
375 }
376 if (options?.includeSteps === true) {
377 query.includeSteps = true;
378 }
379 return this.get<RunResponse>(`/runs/${encodeURIComponent(runId)}`, {
380 query: Object.keys(query).length > 0 ? query : undefined,
381 signal: options?.signal,
382 });
383 }
384
385 /**
386 * Classify an error thrown while issuing OR reading a request. When it is an

Callers

nothing calls this directly

Calls 1

getMethod · 0.95

Tested by

no test coverage detected