QTP - Run Test with VBscript and Results (3948 Views)
Reply
Advisor
RicoLee
Posts: 35
Registered: ‎05-09-2013
Message 1 of 2 (3,948 Views)
Accepted Solution

QTP - Run Test with VBscript and Results

[ Edited ]

Greetings. I used to call my Tests using VBscript and batch file. However I noticed that when the Test fails, it will not create new Results, but passed Tests will.

Is there any way to force or code QTP to save new Results after every runs?

 

I've tried

Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions")
qtResultsOpt.ResultsLocation = "C:\MyTempLocation\"

 but nothing happens.

.-asd-.
Advisor
RicoLee
Posts: 35
Registered: ‎05-09-2013
Message 2 of 2 (3,904 Views)

Re: QTP - Run Test with VBscript and Results

[ Edited ]

I've solved the issue, I just needed to add "qtResultsOpt" to to the object calling QTP to run test.

 

 

Set qtApp=CreateObject("QuickTest.Application")

Set qtResultOpt=CreateObject("QuickTest.RunResultsOptions")

qtResult.ResultsLocation="C:\Temp\"

qtApp.Launch

qtApp.Visible=True

qtApp.Open "C:\QTP\Scripts\MyScript", True

Set objTest=qtApp.Test

objTest.Run qtResultOpt

 

 

Folder creation for results folder

.-asd-.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.