Script to prevent deleting a set if runs exist
I am trying to come up with a script to put into the workflow editor in QC 9.2 that will prevent the user from deleting a test set if any of the tests listed in the set have been run. I have found the fields which give me the test instance's ID number within the set, but without knowing how many tests are in the set, it makes it tough to go through each on in a loop to check for a run.
Basically, I thought I would be able to read the number of tests in the set, then cycle through each one to check to see if it has been run. If any of them have, prevent the deletion of the set.
I am getting all mixed up with trying to use the TDConnection API opening to get the number of tests in a set. Any ideas?