Delete or modify test run via REST API?

Thursday, June 17, 2021
Avatar

 

We are busy logging a part of our automated test runs in Spira. To avoid data overflow, we want to configure our pipeline to only record the LAST run test for each feature branch. Since at the time of logging, we don't know if it is the 'last' run, so we should implement the logic to delete or overwrite the existing run for that branch and testcase.

Recording a test run via the REST API works. Now I'd like to be able to also delete a recorded test run, or to modify/overwrite an existing run (either would be fine). 

According to the REST API docs for 'automated test run' resource:

This resource allows you to retrieve, create, modify and delete automated test runs in a specific project in the system. 

At first glace, I cannot see a DELETE function. My hope was that 

projects/{project_id}/test-runs/record

could be used to also modify an existing test run, since you can pass an existing TestRunId in the request body.

However, even if I pass it it seems to be ignored and it creates a new test run anyway. 

How is this supposed to be used?

 

1 Replies
Tuesday, June 22, 2021
Avatar
re: dl.pie Thursday, June 17, 2021

Hello,

You can find the information in the general Test Run session of the REST API documentation. More specifically:

I hope that helps!

Best regards,

Brian J.

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Thursday, June 17, 2021
  • Last Reply: Tuesday, June 22, 2021
  • Replies: 1
  • Views: 1195