Public Sub UnneededTests() ' Get the list of tests that do not cover any requirement Dim reqF As ReqFactory Dim testF As TestFactory Dim ReqFilter As TDFilter Dim testFilter As TDFilter Dim aTest As Test Dim testL As List Set reqF = tdc.ReqFactory Set ReqFilter = reqF.Filter 'Exclude the top-level folder ReqFilter.Filter("RQ_REQ_ID") = ">= 0" ' Set exclusive XFilter: Filter for items that ' match primary filter and do not match cross filter. Set testF = tdc.TestFactory Set testFilter = testF.Filter testFilter.SetXFilter "TEST-REQ", False, ReqFilter.Text Debug.Print testFilter.Text Set testL = testF.NewList(testFilter.Text) For Each aTest In testL Debug.Print aTest.ID & ": " & aTest.Name Next ' 'To get the tests that DO cover some requirement use this code: ' TestFilter.SetXFilter "TEST-REQ", True, ReqFilter.Text ' Debug.Print TestFilter.Text ' Set testL = testF.NewList(TestFilter.Text) ' ' For Each aTest In testL ' Debug.Print aTest.ID & ": " & aTest.Name ' Next End Sub