Subscribe Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security. Subscribe

Error on closing runs

Hi,

Hope to support with this

After running my tests, I integrated testrail close_run API call to mark the run as completed.

It will result as successful action and on testrail UI the run will be marked as completed.

However,
The test cases inside the run will not have a status update and on CLI I am getting an error log end with

data: { error: ‘This operation is not allowed. The test run is already completed.’ }

Hi @afitiani,
which status update do you expect?

Regarding the error:
Did you try to add a result after closing the run or any other modification on the run?

Hi @kwirth

I am not expecting any status update as i am using an npm package for testrail-cypress reporting

Moreover, the complete flow is working just fine; run the automation will create:
1- new test run
2- fetch all test cases
3- updated accordingly.

My problem is when i call the API close run, it closes it but for a reason the status is not being updated and i face this error

Hi,
I’m a litle bit confused:
You don’t expect an update (first sentence) but on the last you expect an update. So, which entity should be updated?

close_run will close the run and no further activities on it will be possible. This is the status change. You won’t see any changes on the tests inside the run after calling close_run.

Regarding your workflow:
1 & 2 is done in one call on creating the run by adding all cases.
Is there only one test updated in a run and you get x runs for x automated tests or do you get x runs with one updated test inside (assumed you have executed x tests)?

Regarding the error:
When do you receive this error? On closing the run (via close_run), do you try to add a result after closing it or when?