Quantcast
Viewing all articles
Browse latest Browse all 14708

Re: OTA Script to Capture Actual Result from Test Lab

Hi,

 

maybe your Admin set the param DISABLE_COMMAND_INTERFACE to Y so you cannot execute query from outside tools.

 

Try to use OTA Api.

 

Here I post how to retrieve the information of Actual Result for Steps in Runs for all the Test Instances (TSTest) of a TestSet.

 

Suppose you get the TestSet (for ex TestSet ID = 2)

 

1. Connect to QC

2. Create the TestSet Object

3. Create the List of TSTest

4. Analyze all TSTest - do a For Cycle on the list

5. Create the LastRun object

6. Retrieve the StepList

7. Analyze all Step element and retrieve the Actual Result of the Execution Step - Do a For Cycle.

 

'1. Connect to QC (vbscript)

set tdc = CreateObject("TDApiOle80.TDConnection")

 

tdc.InitConnectionEx "http://QCADDRESS/qcbin"

tdc.login "qcusr", "qcpsw"
tdc.Connect "myDom", "myPrj"

 

 

'2. Create the TestSet object

set myTestSet = tdc.TestSetFactory.Item(2)

 

'3. Create the List of TSTest

set TSTestList = myTestSet.TSTestFactory.NewList("")

 

'4. Analyze all TSTest in the TSTestList

for each elTS in TSTestList

       '5. Create the LastRun Object

        myLastRun = elTS.LastRun

      

       '6. Retrieve the StepList

       myStepList = myLastRun.StepFactory.NewList("")

 

      '7. Analyze all Step element and retrieve the Actual Result of the Execution Step

       for each elSt in myStepList

              msgbox elSt.Field("ST_ACTUAL")

       next

 

      set myStepList = Nothing

      set myLastRun = Nothing

    

next

 

set TSTestList = Nothing

set myTestSet = Nothing

 

set tdc = Nothing

 

 

 

8. if you need to remove HTML tag from ST_ACTUAL you can find how to do it here

 

Ciao,

Massimo.

 

 

 


Viewing all articles
Browse latest Browse all 14708

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>