First you need to get the test set in which your scripts are located. (The example below is in Ruby, but it should be no problem to adapt it. @tdc
is the TDConnection object):
test_set_tree_manager = @tdc.TestSetTreeManager
test_set_folder = test_set_tree_manager.NodeByPath("Root\\Some\\Path\\To\\Lab\\Folder")
test_set_list = test_set_folder.FindTestSets("Name of test set")
test_set = test_set_list.Item(1)
Then you need to get the test instances (TSTest) from which you want to get the runs:
test_set_factory = test_set.TSTestFactory
found_test_instances = test_set_factory.NewList("")
Finally, get all the runs from some test instance:
test_instance = found_test_instances.Item(1)
run_factory = test_instance.RunFactory
runs = run_factory.NewList("")
runs
is a List which contains all the test runs of test_instance
.