Retest cases in place: reset their result, keep the original in history
const url = 'https://beta-api.plune.ai/v1/runs/example/retest';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"testCaseIds":["6f1c2b3a-0000-4000-8000-0000000000c1"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://beta-api.plune.ai/v1/runs/example/retest \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "testCaseIds": [ "6f1c2b3a-0000-4000-8000-0000000000c1" ] }'Retest inside a run (#1767). The current results of the named cases in this run are replaced: each old result keeps its row, so it stays in the case’s history (GET /v1/results/{id}/history), and drops out of the run’s counters and result list. Until a new result arrives the case is «awaiting retest» — a state of its own: it is in no counter (not passed, not failed, not muted), not in total, and not in notRun (it did run); GET /v1/runs/{id}/summary lists it under awaitingRetest. The run is not finished until every such case has a new result: finish answers 409 retest_pending naming them, while terminate still works. The result key of the replaced result is freed, so a reporter that sends the same key again, or a person who marks the case again, writes a new result. A case with no current result in the run is skipped with no_result, one already waiting with awaiting. Only a run under way: a finished, terminated or scheduled run and an eval run are 409. A reader is refused (403).
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”object
Examples
Reset one case
{ "testCaseIds": [ "6f1c2b3a-0000-4000-8000-0000000000c1" ]}Responses
Section titled “ Responses ”The cases now awaiting retest, and the ones left out with why
object
object
Example
{ "retested": [ "6f1c2b3a-0000-4000-8000-0000000000c1" ], "skipped": []}Invalid body — testCaseIds, 1 to 10 000 ids
object
Example generated
{ "error": "example"}No / invalid token or session
A reader of the project
object
Example generated
{ "error": "example"}No such run in your projects
object
Example generated
{ "error": "example"}The run is finished, terminated, scheduled or an eval run
object
Example generated
{ "error": "example"}Rate limited