How can we save the qtp results file to a specific folder using qtp script.
I want to save the results through qtp script without using Export To Html option in qtp results file.
Thanks in advance
Your question involves two things:
Storing result into a specific folder.
Generating html report files.
Are you lookin to create html report at run time?
-- Here to Learn and share ---
my question is Storing the results into specific folder.
no need to create html report at runtime. after execution of the script, qtp generates the result report i needs to store that result report file in some location.
Thanks in advance,
You have to use AOM for the same.
Sample script from QTP Automation reference help doc
Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtTest 'As QuickTest.Test ' Declare a Test object variable
Dim qtResultsOpt 'As QuickTest.RunResultsOptions ' Declare a Run Results Options object variable
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Start QuickTest
qtApp.Visible = True ' Make the QuickTest application visible
' Set QuickTest run options
qtApp.Options.Run.ImageCaptureForTestResults = "OnError"
qtApp.Options.Run.RunMode = "Fast"
qtApp.Options.Run.ViewResults = False
qtApp.Open "C:\Tests\Test1", True ' Open the test in read-only mode
' set run settings for the test
Set qtTest = qtApp.Test
qtTest.Settings.Run.IterationMode = "rngIterations" ' Run only iterations 2 to 4
qtTest.Settings.Run.StartIteration = 2
qtTest.Settings.Run.EndIteration = 4
qtTest.Settings.Run.OnError = "NextStep" ' Instruct QuickTest to perform next step when error occurs
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions") ' Create the Run Results Options object
qtResultsOpt.ResultsLocation = "C:\Tests\Test1\Res1" ' Set the results location
qtTest.Run qtResultsOpt ' Run the test
MsgBox qtTest.LastRunResults.Status ' Check the results of the test run
qtTest.Close ' Close the test
Set qtResultsOpt = Nothing ' Release the Run Results Options object
Set qtTest = Nothing ' Release the Test object
Set qtApp = Nothing ' Release the Application object
can you plz use AOM for the same.
Thanks in Advance
Yes you can use AOM, the code that I noted is usage of AOM itself.
Otherwise i didnt get your question
is it possible to save this result as PDF?...like the epxort test result from QTP result window to pdf format.is it possible to do by AOM method?
The below may help http://www.sqaforums.com/showflat.php?Ca...true#Post597578