Req Coverage for a test instance in TL using OTA
I am trying (unsuccessfully) to extract the Requirements Coverage for a test instance in Test Lab. I have been able to extract the Requirements Coverage for a test in Test Plan using the following code:
Set tdTestFactory = tdCnx.TestFactory
Set tdTestFilter = tdTestFactory.Filter
tdTestFilter.Filter("TS_SUBJECT") = "^" & strTestName & "^"
Set tdTestListInFactory = tdTestFactory.NewList(tdTestFilter.Text)
Set t = tdTestListInFactory.Item(1)
blnHasCoverage = t.HasCoverage
If blnHasCoverage = True Then
Set reqList = t.GetCoverList
For Each req In reqList
ReqCover = ReqCover & Chr(10) & req.Name
The GetCoverList method is available for a Test Object but it is not available for a TSTest Object. This wouldn't be a problem except that a test in Test Plan can have different Requirements Coverage compared to the same test in Test Lab. At the moment, I can only extract the Requirements Coverage for a planning test but not for a test instance. Does anyone know if it is possible to extract the Requirements Coverage for a test instance in Test Lab using OTA?
Re: Req Coverage for a test instance in TL using OTA
TSTest implements ICoverable so you might be able to cast to ICoverable, get the coverage factory and then requirements from there. I haven't tried this though, its just a thought.