Saving Test Results when using AOM SCRIPT

280 views
Skip to first unread message

Chandan

unread,
Jul 27, 2011, 6:59:27 PM7/27/11
to QTP eLearn Team
Hi All

I am using AOM script to run my QTP script and save test results on
the local drive. Code lines for doing this are:

Set qtResult = Createobject("QuickTest.RunResultsoptions")
qtResult.ResultsLocation = "C:\temp\QTPResults"
qtTest.Run qtResult, True

What I can see is that it saves results to that specified location but
at the end of the script, results are disappearing.
anyone got a clue around this? Any help around this is much
appreciated.

Regards,
Chandan

Chandan

unread,
Aug 11, 2011, 9:23:14 PM8/11/11
to QTP eLearn Team
Thanks to all who atleast tried to resolve this issue, a bit
disappointed not to see even a single reply.

Anyway I have found a workaround to this for now, but still if someone
has solution still post it here..

FYI - Workaround I have got is to copy that temporary result folder
into another permanant folder before it tries to disappear :-).. A
bit cheeky workaround but it works for now..

Regards,
Chandan

On Jul 28, 8:59 am, Chandan <ckochh...@gmail.com> wrote:
> Hi All
>
> I am usingAOMscript to run my QTP script and save test results on

devanshu bhatt

unread,
Aug 11, 2011, 9:56:22 PM8/11/11
to Chandan, QTP eLearn Team
Hi Chandan, 

Try below code, change the code as per your folder location, once again confirm Exact path of your folder

Function SaveTestResultInaSpecifiedFolder(byval strTestPath, byval strTestResPath)

Dim qtApp
‘ Launch QuickTest
Set qtApp = CreateObject(“QuickTest.Application”) ‘ Create the Application object
qtApp.Launch ‘ Start QuickTest
qtApp.Visible = True ‘ Make the QuickTest application visible
qtApp.Open strTestPath, False ‘ Open the test
Set qtTest = qtApp.Test
Set qtResultsOpt = CreateObject(“QuickTest.RunResultsOptions”) ‘ Create the Run Results Options object
qtResultsOpt.ResultsLocation = strTestResPath ‘ 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
qtApp.Quit

End Function

Call SaveTestResultInaSpecifiedFolder(“C:\Documents and Settings\ADMIN\Desktop\Test2″,”C:\Documents and Settings\ADMIN\Desktop\New Folder”)

Chandan

unread,
Aug 11, 2011, 10:53:30 PM8/11/11
to QTP eLearn Team
Hi Devanshu

Thanks a lot for the reply, I am using same code as part of my AOM
script but the result folder we are saving results in, keep
disappearing as soon as the run finishes.. That is the problem I am
facing and not sure about the reason for this.

I have got this code in a vb script, which loads QTP, opens script,
runs script, saves result, closes QTP etc.
Now it is successfully saving results, as its running I can see the
results in the specified folder but as said, results disappear
straight after the script finishes.

Regards,
Chandan
Reply all
Reply to author
Forward
0 new messages