I wrote a little tool in VB Script last year to retrieve the TestID with the following code.
Dim TSTestFact = tsObject.TSTestFactory
Dim TestSetTestsList = TSTestFact.NewList("")
For Each tsInstance In TestSetTestsList
Dim tid As String = tsInstance.ID
Dim testqcID As String = tsInstance.TestID
Dim testname As String = tsInstance.Name
Dim statusOfTest As String = tsInstance.Status
Next
This is working fine. Now, also Defects are available in QC and I need to know a "Defect ID" corresponding to a TestID. Any suggestion how to access the "Defect ID" in Quality Center? Thanks
Inside your for loop add following logic
Dim tsTest as TSTest = tsInstance
Dim linkFactory as LinkFactory = tsTest.LinkFactory
// From link factory object extract defects which are linked to corresponding test
Thanks,
Gaurav