2

We have to run QTP VB Scripts from Jenkins being as a part of CI Can any one suggest me what is the best way to integrate ?

Advanced thanks Thanks

Raju
  • 137
  • 2
  • 4
  • 15
  • possible duplicate of [Running Quicktest Pro tests from maven/Jenkins?](http://stackoverflow.com/questions/7446813/running-quicktest-pro-tests-from-maven-jenkins) – bummi May 20 '15 at 16:22
  • For those who are still looking for some detailed answer, http://www.testautomationguru.com/executing-qtpuft-scripts-using-jenkins/ – vins May 20 '15 at 17:15

1 Answers1

3

Jenkins can run anything you can run from the command line, and you can create QTP Automation objects :

Dim Application
Set Application = CreateObject("QuickTest.Application")
Application.Launch 
Application.Visible = True 
Application.Open "testfile", True 

Dim Test
Set Test = Application.Test
Test.Run

If you search for quicktest.application you will find plenty of examples.

You can start this procedure using a Windows Batch Command build step in Jenkins with the cscript interpreter.

Anders Lindahl
  • 41,582
  • 9
  • 89
  • 93
  • Thanks for your help Anders, So should I mention list of test scripts which I want to run in .BAT file ? If I want to see test results in Jenkins is it possible ? – Raju Jan 14 '13 at 15:51
  • Yes, the BAT file should contain the commands you wish to run - what you would run in the command prompt on a windows workstation. To import the test results in Jenkins, they will have to be in a format that Jenkins understand. The format is not very complex: http://stackoverflow.com/questions/4922867/junit-xml-format-specification-that-hudson-supports – Anders Lindahl Jan 14 '13 at 15:57
  • Hi I am connecting JENKINS(machine1) TO QTP (machine2) so I am connecting through Remote desktop connection by using vb script. – Raju Jan 25 '13 at 15:36
  • strUser = "K003277" strDomain = "PNKUKDEV" strComputer ="DV01123" strPassword = "Pork2013" Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator") Set objWMIService = objSWbemLocator.ConnectServer(strComputer, _ "root\CIMV2", _ strUser, _ strPassword, _ "MS_409", _ "NTLMDomain:" + strDomain) – Raju Jan 25 '13 at 15:40