Skip to content

Retest cases in place: reset their result, keep the original in history

POST
/v1/runs/{id}/retest
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).

id
required
string
Media type application/json
object
testCaseIds
required
Array<string>
>= 1 items <= 10000 items
Examples
Example example

Reset one case

{
"testCaseIds": [
"6f1c2b3a-0000-4000-8000-0000000000c1"
]
}

The cases now awaiting retest, and the ones left out with why

Media type application/json
object
retested
required
Array<string>
skipped
required
Array<object>
object
id
required
string
reason
required
string
Allowed values: no_result awaiting
Example
{
"retested": [
"6f1c2b3a-0000-4000-8000-0000000000c1"
],
"skipped": []
}

Invalid body — testCaseIds, 1 to 10 000 ids

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No / invalid token or session

A reader of the project

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No such run in your projects

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

The run is finished, terminated, scheduled or an eval run

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

Rate limited