Set TSChildren = TSFolder.FindChildren("")
For Each TSChild In TSChildren
Set TSFactory = TSChild.testSetFactory
Set TSList = TSFactory.NewList("")
'Iterate through all the Test Sets
For Each TestSet In TSList
Set TSTestFactory = TestSet.TSTestFactory.NewList("")
For Each TF In TSTestFactory
k = k + 1
Debug.Print "TC Count: " & k
If TF.Status <> "No Run" Then
Set runF = TF.RunFactory
Set runFilter = runF.Filter
runFilter.Clear
runFilter("RN_EXECUTION_DATE") = ">= " & Date
Set runList = runF.NewList(runFilter.Text)
'filter by execution date
'take nth run list
iRunListCount = runList.Count
totalRunCount = 0
For Each RunItem In runList
Set LnkFact = RunItem.BugLinkFactory
LnkFact.FullLinkage = True 'for step links
For Each Lnk In LnkFact.NewList("")
/* Here my defects are not getting displayed*/
Set MyBug = Lnk.TargetEntity
Next
Next
End If
Next
Next
Next
Using above code I am not able to my get my linked defects for a test case.
Note : The reason is all defects were linked to a test instance, not to test run.