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

Using API-Way to copy Milestones with Test Cases & no change in Caseid


#1

What we need is to run automation regression against a particular milestone & report results onto the same. But, since the Case id or Run id changes for each run/Milestone-Is there a way to simply copy the test runs across using API.


#2

The case id changes so that the history of the test is kept separate from the original test case. the case id will always be changed when added to a test run.


#3

Hi Chandas,

Thanks for your post! Just to clarify: the base test case ID from your test case repository would always be the same, and when a test run is created, an ‘instance’ of the test case is created in the form of a test ID. These are separate entities though, and test runs would always contain the test entity while your test case repository would always maintain the same test case IDs. So in this case, when adding results to TestRail, we would recommend using the add_result_for_case API methods, as this would allow you to use the base case ID (which would always be the same) instead of the test IDs (as the test IDs would always be different for each test run). You can learn more about the add_result_for_case methods on our website here:

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

Hope this helps!

Regards,
Marco