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

Method listTestRuns

src/lib/http.ts:346–353  ·  view source on GitHub ↗

* GET /api/cli/v1/tests/{testId}/runs * List a test's prior run history, newest-first. * * Limit-before-filter caveat: a `source`-filtered page may return fewer * than `pageSize` rows while still yielding a non-null `nextCursor`. * That means "none in THIS window", not end-of-history.

(testId: string, query: ListRunsQuery)

Source from the content-addressed store, hash-verified

344 * That means "none in THIS window", not end-of-history.
345 */
346 async listTestRuns(testId: string, query: ListRunsQuery): Promise<ListRunsResponse> {
347 const q: Record<string, string | number | undefined> = {};
348 if (query.cursor !== undefined) q.cursor = query.cursor;
349 if (query.pageSize !== undefined) q.pageSize = query.pageSize;
350 if (query.source !== undefined) q.source = query.source;
351 if (query.since !== undefined) q.since = query.since;
352 return this.get<ListRunsResponse>(`/tests/${encodeURIComponent(testId)}/runs`, { query: q });
353 }
354
355 /**
356 * GET /api/cli/v1/runs/{runId}

Callers 1

runResultHistoryFunction · 0.80

Calls 1

getMethod · 0.95

Tested by

no test coverage detected