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

Is there a way to pull parent_id, section_id, status_id and case_id on a single API get statement?

I created a UIScript to populate below table as part of my company’s weekly reporting:

What I want to have in order to create the table are (Section name, Feature name, Total of each test results)

In order to do the above table for our reporting I need to execute 3 API GET calls:

get_tests/run_id (to get the test cases and results)
get_case/case_id (to get the test case information such as the testsuite/section)
get_section/section_id (to get the parent_id so that I can populate each of the section’s table)

I also enable the “async: false” option for ajax.

But it seems like this is a very slow approach, any suggestions or any other method to do the above?

Hi Nino,

There wouldn’t be any single API call that would provide the information requested. However using the Comparison for Cases report that is built into TestRail, the following chart is displayed at the top of the report.

Just be sure to select or filter for the test runs desired under Report Options.

Hi vtran, we are using the single repository approach where-in we have only 1 master test suite and from there, it seems like I cannot get the summary per parent section if I create the only 1 test run for it. That is why I opted to create that script in order to do what is on that table. Any other suggestions?

Hi Nino,

Sorry for the very late reply. Yes in my example the single repository for all test cases project type was used.