I am looking to create a macro outside ALM to upload CSV file as iterations to a test instance in test lab. I am stuck at a point where I am not able to see any method or logic in QC OTA to access Test Instance details. Please, let me know if anyone has tried something similar to this or has any suggestions towards the approach I should take.
Asked
Active
Viewed 433 times
1 Answers
0
This code will iterate over all the test instances in a project and set their status property to some value.
TSTestFactory tstf = (TSTestFactory)connection.TSTestFactory;
List tsts = tstf.NewList("");
foreach (TSTest tst in tsts)
{
tst.Status = status;
tst.Post();
}
If you have a TestSet instance then you can grab its TSTestFactory using:
TSTestFactory tstf = (TSTestFactory)test_set.TSTestFactory;
You can then use the NewList code but using this factory to get just the test instances of the particular TestSet.
Or if you want to create a test instance that references an existing test plan use:
TSTest tst = (TSTest)tstf.AddItem(test_plan_id);

TheArtTrooper
- 1,105
- 8
- 19