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

Update_run not working when adding new Test Cases to Test Run


#1

Hi,

I’m currently working on a program that will add a test case to a test run if it isn’t already included.

I don’t get an API error when I get_tests from the test run, append the new test case to the array, and then call update_run with the new test. However, after doing this, the new test case does not show up in the run.

I feel like the problem might be coming from my misunderstanding of a Test Case ID vs a Test ID…

when i get_tests, the IDs returned are not the same form as the Test Case ID that I am trying to add (e.g. already-in-the-run SampleTest’s Case ID is 1270579 vs what is returned from get_tests, 38088118)

Any suggestions of how I might fix this? (get the Test ID for the new test I’m trying to add?)


#2

When a test case (C1) is added to a Test Run, a copy of the original C1 case and is then assigned a T1 id. C1 and T1 are the same case but T1 is a copy of the original. Case results are never saved to the original C1 test case so the case can be reused.


#3

Okay, that makes sense. So when I want to add C2 to my test run, I do a get_tests which returns a list [T1], to which I append C2 and then call update_run with [T1, C2] as in the case_ids field. The next time I call get_tests though, only T1 is there…