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

Status id for skipped - Testrail API


#1

Does anyone have know the status id for skipped. Need to add result using Test rail Api by passing value as skipped. Need status id for skipped.


#2

Hi Priya,

Thanks for your posting. Skipped is a custom status your team has added and you can find the full list of statuses including IDs in the administration area (Administration > Customizations). The ID is part of the URL when you click on a status. You can also use the get_statuses API method to get the status list programmatically:

http://docs.gurock.com/testrail-api2/reference-statuses

I hope this helps!

Regards,
Tobias


#3

But I need to post status as skipped, not get status, please let me know how to post status for skipped. That URL helped me, but for help me for post status.


#4

Do you mean adding a new test result with the Skipped status? You can do this by passing the ID of the Skipped status via the status_id field as part of the add_result or add_result_for_case API calls:

http://docs.gurock.com/testrail-api2/reference-results

The ID of the Skipped status depends on your configuration (as it’s a custom status) and you can find out the ID in the UI or via the get_statuses API call as mentioned.

Or do you mean something else?

Regards,
Tobias


#5

Ya got it. thank you so much for your reply.


#6

Great to hear that and you are welcome!

Regards,
Tobias


#7

Sorry for the topic updating, but when I use the Untested status I get an exception.
I use the add_results_for_cases/ and when I use the status_id for Untested case status I get the following exception "{\"error\":\"Field :results.status_id uses an invalid status (Untested).\"}"
I rechecked this status ID in Administration > Customizations and it has correct id (3)
When I change status ID for a test case from ‘3’ to another one (e.g. passed - 1, failed - 5 or partial -4) - it works. It does not work only with the ‘untested - 3’ status.
Could you please help me to solve this or give some advise.

Added
As a temporary solution, I added new one status - ‘Untested Automation - 6’ and it works for now, but still it would be good to sort it out.