Highlighted
Absent Member.
Absent Member.
1521 views

HP QuickTest Professional - Batch File

Jump to solution

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-.
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

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-.

View solution in original post

2 Replies
Highlighted
Absent Member.
Absent Member.

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-.

View solution in original post

Highlighted
New Member.

i tried your code...its working fine... thanks a lot ... 🙂

i have 1 doubt: if I want the execution status(pass or fail) in ALM by using your menthod then how can i do that.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.