I was writing VB Script to retrieve the config ID of a test ID. I get the test ID, Name, Status with 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 works fine and I am happy. But, my problem is that I can not get the information about config ID of a test ID. Any ideas or suggestions regarding how to get the test configuration ID or similar information?
You can get a TestConfig object with tsInstance.TestConfiguration
. Then you can get the ID of this object. Untested code:
Dim testConfiguration As TestConfig = tsInstance.TestConfiguration
Dim testConfigID As String = testConfiguration.ID
It seems there is also another way to get the TestConfiguration object: Via the TDConnection.TestConfigFactory
. The TestConfigFactory allows you to apply filters the same way as other factory-objects.