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

Use the API to acquire the test ID

I am setting up some automation testing in python. I am able to update test cases through the api without issue.
The issue that I am having is determining the test ID of a test within a run. I can hardcode a test ID into a specific test case, and that works, but if I generate a new run the test ID will be different.
I would think that If I know the Test Case number and the run ID, I should be able to find the test ID. I could script around this, but I wanted to know if there was a solution already?

I didn’t find any magic solution.
For our project, to do what you want at the end of the each test session, we get the full list of test cases. Then for each test result our test runner returns (pytest), we look for the test case name within the test cases list. So we can get the test case id.