Public Sub TestsInTestSet(tsName As String, _ tsFolderPath As String) Dim testSetF As TestSetFactory, tsFilter As TDFilter ' Getting the list of design tests used in a test set ' This example shows how to get a list of all the tests in ' a test set. The input is a test set name and the full ' path of the test set, for example, "Root\MyXFilter\MyTestSets." ' Get the filter for the TestSet to be used in the XFilter. ' Dim labTreeMgr As TestSetTreeManager Dim labFolder As SysTreeNode ' Get the node containing the test set. 'tdc is the global TDConnection object. Set labTreeMgr = tdc.TestSetTreeManager Set labFolder = labTreeMgr.NodeByPath(tsFolderPath) ' Get the factory object for the node. Set testSetF = labFolder.TestSetFactory ' Filter for the desired test set. Set tsFilter = testSetF.Filter tsFilter.Filter("CY_CYCLE") = tsName ' Debug.Print tsFilter.Text ' [Filter]{ ' TableName:CYCLE, ' ColumnName:CY_CYCLE, ' LogicalFilter:TS1, ' VisualFilter:TS1, ' NO_CASE: ' } ' ' Get the Test filter object. This filter is unconditional. ' We want all the tests from the test set. ' Dim testF As TestFactory, testFilter As TDFilter Set testF = tdc.TestFactory Set testFilter = testF.Filter ' Set the cross filter: All tests associated with the ' test sets that meet the criteria - in this case, the ' one test set whose name was passed to this routine. testFilter.SetXFilter "TEST-TESTSET", True, tsFilter.Text ' Debug.Print TestFilter.Text ' [Filter]{ ' FLT:[X], ' TYPE:TEST-TESTSET, ' EXISTS_IN_IDS:Y, ' IN_IDS:\00000067\[Filter]{ ' TableName:CYCLE, ' ColumnName:CY_CYCLE, ' LogicalFilter:TS1, ' VisualFilter:TS1, ' NO_CASE: ' } ' 'Get the list and output it. Dim testList As List, tst As Test Set testList = testFilter.NewList() For Each tst In testList With tst Debug.Print .name End With Next tst End Sub