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

List of test cases in a Test Run


#1

I am trying to get a list of testcases (TestCase ID’s) for a given Test Run (Test_run_id)) but not clear as to how to get this. Looks like a Test Run can contain a complete suite, or just a few test cases from a suite. In order to upload test results using “add_result_for_case”, the test_run_id and the corresponding testcase IDs are needed.

Thanks.


#2

Hello Satya,

Thanks for your posting. The test and test case IDs are available via the get_tests API call. You can either just use add_result or add_result_for_case to add a result. The former requires just the test ID and the latter requires the run and test case ID (which is internally used to look up the test ID). That said, you would usually store the test case IDs together with your automated tests and then use these IDs to submit the results. The test case IDs don’t change across different test runs and can therefore easily submit results via add_result_for_case.

I hope this helps and just let me know in case you have any further questions.

Regards,
Tobias


#3

Thank you for your suggestion. The add_tests api response does contain the testcase IDs for each run, so that is what I needed.

-Satya


#4

That’s great, thanks for the feedback. Have a good weekend.

Regards,
Tobias