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

Method triggerRerun

src/lib/http.ts:286–297  ·  view source on GitHub ↗

* POST /api/cli/v1/tests/{testId}/runs/rerun * Trigger a rerun (replay) for a single test. FE: verbatim script replay (no credits). * BE: dependency-closure re-run. Returns `runId` + optional `closure` (BE). * * `retryOnConflict: false` — 409 on rerun means the test is already in-flight,

(
    testId: string,
    body: RerunRequest,
    options: { idempotencyKey: string; signal?: AbortSignal },
  )

Source from the content-addressed store, hash-verified

284 * a persistent condition. Retrying would race against the running test.
285 */
286 async triggerRerun(
287 testId: string,
288 body: RerunRequest,
289 options: { idempotencyKey: string; signal?: AbortSignal },
290 ): Promise<RerunResponse> {
291 return this.postWithMeta<RerunResponse>(`/tests/${encodeURIComponent(testId)}/runs/rerun`, {
292 body,
293 headers: { 'idempotency-key': options.idempotencyKey },
294 signal: options.signal,
295 retryOnConflict: false,
296 }).then(r => r.body);
297 }
298
299 /**
300 * POST /api/cli/v1/tests/batch/rerun

Callers 1

runTestRerunFunction · 0.80

Calls 1

postWithMetaMethod · 0.95

Tested by

no test coverage detected