Re: HP QuickTest Professional - Batch File (262 Views)
Reply
Advisor
RicoLee
Posts: 35
Registered: ‎05-09-2013
Message 1 of 2 (296 Views)
Accepted Solution

HP QuickTest Professional - Batch File

Hi, I would like to know how to create a simple batch file that can be used to schedule to launch my Tests using HP QuickTest Pro. There's some examples with the use of VB script but I am not fond of coding and couldnt make it successfully.

Thanks in advance.

 
.-asd-.
Please use plain text.
Advisor
RicoLee
Posts: 35
Registered: ‎05-09-2013
Message 2 of 2 (262 Views)

Re: HP QuickTest Professional - Batch File

[ Edited ]

Nevermind, I've made the VB script and the batch file which can initialize HP QuictTest and run with scheduler.

The Batch file:

cscript.exe "C:\TestScripts\Execution Scripts\DDF Model - TouchPoint.vbs" 
'pause	'#disabled pause, which was used to view error messages. 

 The VB script:

Dim qtApp 'As QuickTest.Application '#Declare the Application object variable
Dim qtTest 'As QuickTest.Test '#Declare a Test object variable

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

qtApp.Open "C:\TestScripts\QuickTest", True '#Open the test in read-only mode

'# Set run settings for the test
Set qtTest = qtApp.Test
qtTest.Run ' Run the test

WScript.StdOut.Write "Status is:" & qtTest.LastRunResults.Status '#Check the results of the test run
qtTest.Close '#Close the test 
qtApp.Quit '#Close the application 

Set qtResultsOpt = Nothing '#Release the Run Results Options object
Set qtTest = Nothing '#Release the Test object
Set qtApp = Nothing '#Release the Application object

 

.-asd-.
Please use plain text.
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