Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - How to export QTP results to an ".xls" file?

asked marvit August 29, 2014 08:42 AM  

How to export QTP results to an ".xls" file?


1 Answers

answered By Dharma   0  
Dim strTestPath ' full filepath to the test
strTestPath = "C:\Program Files\Mercury Interactive\QuickTest Professional\Tests\testresultsexample"

' Launch QuickTest
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Start QuickTest
qtApp.Visible = True ' Make the QuickTest application visible

' Run the Test
qtApp.Open strTestPath, False ' Open the test Set qtTest = qtApp.Test
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions") ' Create the Run Results Options object

testres = "C:\temp\Res1" ' Original location for the test results.
qtResultsOpt.ResultsLocation = testres ' Specify the location to save the test results.
qtTest.Run qtResultsOpt, True ' Run the test and wait until end of the test run

' Close QuickTest Professional

' Copy the test results to additional locations.
Set fso = CreateObject("Scripting.FileSystemObject")

fso.CopyFolder testres, "C:\temp\Res2_copy"
fso.CopyFolder testres, "C:\Program Files\Mercury Interactive\QuickTest Professional\Tests\testresultsexample\CopiedRes1"

Set fso = Nothing
Set qtResultsOpt = Nothing
Set qtApp = Nothing
   add comment

Your answer

Join with account you already have



Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!