Unified Functional Testing Practitioners Forum
cancel

QTP - Run Test with VBscript and Results

SOLVED
Go to solution
Highlighted
RicoLee
Super Collector

QTP - Run Test with VBscript and Results

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-.
1 REPLY
RicoLee
Super Collector
Solution

Re: QTP - Run Test with VBscript and Results

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-.
//Add this to "OnDomLoad" event