Integrate UFT with Jenkins Guide

10
Integrate UFT with Jenkins Guide 1 Introduction This document will guide you how to deploy Jenkins (Ver Windows) and how to do continuous integration by using HP Application Automation Tools with Jenkins. The plugin “HP Application Automation Tools”(Ver 2.02) allows Jenkins to trigger HP tests such as: Test sets on Application Lifecycle Management, tests saved on the file system from Unified Functional Testing, QuickTest Professional, or Service Test, and LoadRunner scenarios. About this Plugin This plugin allows you to trigger an HP test as a build step and present the results in the Jenkin's UI, similar to JUnit. This plugin currently supports: * HP Unified Functional Testing 11.50 (QuickTest Professional and Service Test 11.50 capabilities) * HP Service Test 11.20 and 11.50 * HP LoadRunner 11.52 * HP QuickTest Professional 11.00 * HP Application Lifecycle Management 11.00 and 11.52 * HP ALM Lab Management 11.50 and 11.52 * HP Quality Center 10.00, with the QuickTest Professional Add- in for triggering test sets 2 Deploy Jenkins (Ver Windows) 2.1 Deploy JAVA and Tomcat environment You can find all necessary installation packages from the remote link . a) Install jdk, double click “jdk-6u45-windows-i586.exe”. b) Unzip “apache-tomcat-7.0.47.zip” to “C:\Apache”. 2.2 Configure Environment Variables

Transcript of Integrate UFT with Jenkins Guide

Page 1: Integrate UFT with Jenkins Guide

Integrate UFT with Jenkins Guide

1 IntroductionThis document will guide you how to deploy Jenkins (Ver Windows) and how to do continuous integration by using HP Application Automation Tools with Jenkins The plugin ldquoHP Application Automation Toolsrdquo(Ver 202) allows Jenkins to trigger HP tests such as Test sets on Application Lifecycle Management tests saved on the file system from Unified Functional Testing QuickTest Professional or Service Test and LoadRunner scenarios

About this Plugin

This plugin allows you to trigger an HP test as a build step and present the results in the Jenkins UI similar to JUnit

This plugin currently supports HP Unified Functional Testing 1150 (QuickTest Professional and Service Test 1150 capabilities) HP Service Test 1120 and 1150 HP LoadRunner 1152 HP QuickTest Professional 1100 HP Application Lifecycle Management 1100 and 1152 HP ALM Lab Management 1150 and 1152 HP Quality Center 1000 with the QuickTest Professional Add-in for triggering test sets

2 Deploy Jenkins (Ver Windows)

21 Deploy JAVA and Tomcat environmentYou can find all necessary installation packages from the remote link a) Install jdk double click ldquojdk-6u45-windows-i586exerdquo b) Unzip ldquoapache-tomcat-7047ziprdquo to ldquoCApacherdquo

22 Configure Environment VariablesSet System Environment Variables as below a) JAVA_HOME = CProgram Files (x86)Javajdk160_45

CATALINA_HOME = CApacheapache-tomcat-7047b) Update ldquoPathrdquo Add ldquoJAVA_HOMEbinrdquo and ldquoCATALINA_HOMEbinrdquo to ldquoPathrdquo

23 Start Tomcat and Publish Jenkinsa) Copy ldquojenkinswarrdquo to ldquoCApacheapache-tomcat-7047webappsrdquob) To run ldquoCApacheapache-tomcat-7047binstartupbatrdquo to start the Tomcat application

in cmd

c) If the message ldquoJenkins is fully up and runningrdquo pops up at the screen It means the Jenkins has been published successfully

Jenkins Local URLhttplocalhost8080jenkins

Jenkins Remote URLhttpHostnamePort(or IP addressPort) Jenkins (such as ldquohttpc0005226itcshpcom8080jenkinsrdquo)

d) If you prefer you can update the Jenkins Services configuration to ldquoAutomatic Startedrdquo

3 Install the Plug-in of HP Application Automation Toolsa) Login to Jenkins b) Click the link ldquoManage Jenkinsrdquo -gt ldquoManage Pluginsrdquo then click ldquoAdvancedrdquo tabc) Enter the Server ldquoweb-proxyrosehpcomrdquo and Port ldquo8088rdquo then click ldquoSubmitrdquo

d) Click ldquoAvailablerdquo tabe) Filter the name ldquoHP Application Automation Toolsrdquo f) Click on the Install checkbox and click on the ldquoDownload Now and Install After Restartldquo

button

4 Configure Jenkins

41 Set up a jobOnce the add-in is installed and you have restarted Jenkinsa) Click on the ldquoJenkinsldquo -gt ldquoNew Jobldquo menu option b) Enter a Job Name (such as ldquoUFTrdquo) and click on the rdquoBuild a free-style software project

optionrdquo Click ldquoOKrdquo

c) Under the your new projectrsquos configuration scroll down to the ldquoBuildldquo section and click on the ldquoAdd build stepldquo and click on the Execute ldquoHP tests from file systemldquo option

d) In the Tests box enter a test with its full absolute path or a folder or MTB containing one or more tests or scenarios To specify multiple entries click the down arrow on the right of the field and enter each test path on a separate line Make sure that the paths are accessible from all machines in the local network For example if you want to run these case as below

ECS-1711a_Server Configuration_Check Password_CommercialNon_Authority_Assign_RoleYou must configure the tests box like the following graph Of course you can configure ldquoCVivi_ATAT SourceCodeBPTrdquo when yoursquore fully running all of the cases in ldquoBPTrdquo folder

e) Optionally indicate a timeout in seconds after which the job will fail in the Timeout box

42 Set up the Post Build Actionsa) Under the rdquoPost-build Actionsrdquo section click on the rdquoAdd post-build actionrdquo and

select rdquoPublish HP tests resultrdquo

b) Select an archiving option for the test run results Archive test run results for failed tests - save test results for failed tests only

Always archive test run results - always save test result reports Do not archive test run results - never save the test results

c) rdquoApplyrdquo and rdquoSaverdquo your settings

5 Run JobClick ldquoBuild Nowrdquo

6 Check Resulta) Click ldquoJob Linkrdquo -gt ldquoConsole Outputrdquo to see the ldquoConsole Outputrdquo

b) According to the above graph the report is gotten at the path of ldquoCVivi_ATAT SourceCodeBPTECS-1711a_Server Configuration_Check Password_CommercialReportrdquo you can check the detail report by using ldquoRun Results Viewerrdquo

c) You can also download the detail your local env

Page 2: Integrate UFT with Jenkins Guide

23 Start Tomcat and Publish Jenkinsa) Copy ldquojenkinswarrdquo to ldquoCApacheapache-tomcat-7047webappsrdquob) To run ldquoCApacheapache-tomcat-7047binstartupbatrdquo to start the Tomcat application

in cmd

c) If the message ldquoJenkins is fully up and runningrdquo pops up at the screen It means the Jenkins has been published successfully

Jenkins Local URLhttplocalhost8080jenkins

Jenkins Remote URLhttpHostnamePort(or IP addressPort) Jenkins (such as ldquohttpc0005226itcshpcom8080jenkinsrdquo)

d) If you prefer you can update the Jenkins Services configuration to ldquoAutomatic Startedrdquo

3 Install the Plug-in of HP Application Automation Toolsa) Login to Jenkins b) Click the link ldquoManage Jenkinsrdquo -gt ldquoManage Pluginsrdquo then click ldquoAdvancedrdquo tabc) Enter the Server ldquoweb-proxyrosehpcomrdquo and Port ldquo8088rdquo then click ldquoSubmitrdquo

d) Click ldquoAvailablerdquo tabe) Filter the name ldquoHP Application Automation Toolsrdquo f) Click on the Install checkbox and click on the ldquoDownload Now and Install After Restartldquo

button

4 Configure Jenkins

41 Set up a jobOnce the add-in is installed and you have restarted Jenkinsa) Click on the ldquoJenkinsldquo -gt ldquoNew Jobldquo menu option b) Enter a Job Name (such as ldquoUFTrdquo) and click on the rdquoBuild a free-style software project

optionrdquo Click ldquoOKrdquo

c) Under the your new projectrsquos configuration scroll down to the ldquoBuildldquo section and click on the ldquoAdd build stepldquo and click on the Execute ldquoHP tests from file systemldquo option

d) In the Tests box enter a test with its full absolute path or a folder or MTB containing one or more tests or scenarios To specify multiple entries click the down arrow on the right of the field and enter each test path on a separate line Make sure that the paths are accessible from all machines in the local network For example if you want to run these case as below

ECS-1711a_Server Configuration_Check Password_CommercialNon_Authority_Assign_RoleYou must configure the tests box like the following graph Of course you can configure ldquoCVivi_ATAT SourceCodeBPTrdquo when yoursquore fully running all of the cases in ldquoBPTrdquo folder

e) Optionally indicate a timeout in seconds after which the job will fail in the Timeout box

42 Set up the Post Build Actionsa) Under the rdquoPost-build Actionsrdquo section click on the rdquoAdd post-build actionrdquo and

select rdquoPublish HP tests resultrdquo

b) Select an archiving option for the test run results Archive test run results for failed tests - save test results for failed tests only

Always archive test run results - always save test result reports Do not archive test run results - never save the test results

c) rdquoApplyrdquo and rdquoSaverdquo your settings

5 Run JobClick ldquoBuild Nowrdquo

6 Check Resulta) Click ldquoJob Linkrdquo -gt ldquoConsole Outputrdquo to see the ldquoConsole Outputrdquo

b) According to the above graph the report is gotten at the path of ldquoCVivi_ATAT SourceCodeBPTECS-1711a_Server Configuration_Check Password_CommercialReportrdquo you can check the detail report by using ldquoRun Results Viewerrdquo

c) You can also download the detail your local env

Page 3: Integrate UFT with Jenkins Guide

Jenkins Remote URLhttpHostnamePort(or IP addressPort) Jenkins (such as ldquohttpc0005226itcshpcom8080jenkinsrdquo)

d) If you prefer you can update the Jenkins Services configuration to ldquoAutomatic Startedrdquo

3 Install the Plug-in of HP Application Automation Toolsa) Login to Jenkins b) Click the link ldquoManage Jenkinsrdquo -gt ldquoManage Pluginsrdquo then click ldquoAdvancedrdquo tabc) Enter the Server ldquoweb-proxyrosehpcomrdquo and Port ldquo8088rdquo then click ldquoSubmitrdquo

d) Click ldquoAvailablerdquo tabe) Filter the name ldquoHP Application Automation Toolsrdquo f) Click on the Install checkbox and click on the ldquoDownload Now and Install After Restartldquo

button

4 Configure Jenkins

41 Set up a jobOnce the add-in is installed and you have restarted Jenkinsa) Click on the ldquoJenkinsldquo -gt ldquoNew Jobldquo menu option b) Enter a Job Name (such as ldquoUFTrdquo) and click on the rdquoBuild a free-style software project

optionrdquo Click ldquoOKrdquo

c) Under the your new projectrsquos configuration scroll down to the ldquoBuildldquo section and click on the ldquoAdd build stepldquo and click on the Execute ldquoHP tests from file systemldquo option

d) In the Tests box enter a test with its full absolute path or a folder or MTB containing one or more tests or scenarios To specify multiple entries click the down arrow on the right of the field and enter each test path on a separate line Make sure that the paths are accessible from all machines in the local network For example if you want to run these case as below

ECS-1711a_Server Configuration_Check Password_CommercialNon_Authority_Assign_RoleYou must configure the tests box like the following graph Of course you can configure ldquoCVivi_ATAT SourceCodeBPTrdquo when yoursquore fully running all of the cases in ldquoBPTrdquo folder

e) Optionally indicate a timeout in seconds after which the job will fail in the Timeout box

42 Set up the Post Build Actionsa) Under the rdquoPost-build Actionsrdquo section click on the rdquoAdd post-build actionrdquo and

select rdquoPublish HP tests resultrdquo

b) Select an archiving option for the test run results Archive test run results for failed tests - save test results for failed tests only

Always archive test run results - always save test result reports Do not archive test run results - never save the test results

c) rdquoApplyrdquo and rdquoSaverdquo your settings

5 Run JobClick ldquoBuild Nowrdquo

6 Check Resulta) Click ldquoJob Linkrdquo -gt ldquoConsole Outputrdquo to see the ldquoConsole Outputrdquo

b) According to the above graph the report is gotten at the path of ldquoCVivi_ATAT SourceCodeBPTECS-1711a_Server Configuration_Check Password_CommercialReportrdquo you can check the detail report by using ldquoRun Results Viewerrdquo

c) You can also download the detail your local env

Page 4: Integrate UFT with Jenkins Guide

4 Configure Jenkins

41 Set up a jobOnce the add-in is installed and you have restarted Jenkinsa) Click on the ldquoJenkinsldquo -gt ldquoNew Jobldquo menu option b) Enter a Job Name (such as ldquoUFTrdquo) and click on the rdquoBuild a free-style software project

optionrdquo Click ldquoOKrdquo

c) Under the your new projectrsquos configuration scroll down to the ldquoBuildldquo section and click on the ldquoAdd build stepldquo and click on the Execute ldquoHP tests from file systemldquo option

d) In the Tests box enter a test with its full absolute path or a folder or MTB containing one or more tests or scenarios To specify multiple entries click the down arrow on the right of the field and enter each test path on a separate line Make sure that the paths are accessible from all machines in the local network For example if you want to run these case as below

ECS-1711a_Server Configuration_Check Password_CommercialNon_Authority_Assign_RoleYou must configure the tests box like the following graph Of course you can configure ldquoCVivi_ATAT SourceCodeBPTrdquo when yoursquore fully running all of the cases in ldquoBPTrdquo folder

e) Optionally indicate a timeout in seconds after which the job will fail in the Timeout box

42 Set up the Post Build Actionsa) Under the rdquoPost-build Actionsrdquo section click on the rdquoAdd post-build actionrdquo and

select rdquoPublish HP tests resultrdquo

b) Select an archiving option for the test run results Archive test run results for failed tests - save test results for failed tests only

Always archive test run results - always save test result reports Do not archive test run results - never save the test results

c) rdquoApplyrdquo and rdquoSaverdquo your settings

5 Run JobClick ldquoBuild Nowrdquo

6 Check Resulta) Click ldquoJob Linkrdquo -gt ldquoConsole Outputrdquo to see the ldquoConsole Outputrdquo

b) According to the above graph the report is gotten at the path of ldquoCVivi_ATAT SourceCodeBPTECS-1711a_Server Configuration_Check Password_CommercialReportrdquo you can check the detail report by using ldquoRun Results Viewerrdquo

c) You can also download the detail your local env

Page 5: Integrate UFT with Jenkins Guide

ECS-1711a_Server Configuration_Check Password_CommercialNon_Authority_Assign_RoleYou must configure the tests box like the following graph Of course you can configure ldquoCVivi_ATAT SourceCodeBPTrdquo when yoursquore fully running all of the cases in ldquoBPTrdquo folder

e) Optionally indicate a timeout in seconds after which the job will fail in the Timeout box

42 Set up the Post Build Actionsa) Under the rdquoPost-build Actionsrdquo section click on the rdquoAdd post-build actionrdquo and

select rdquoPublish HP tests resultrdquo

b) Select an archiving option for the test run results Archive test run results for failed tests - save test results for failed tests only

Always archive test run results - always save test result reports Do not archive test run results - never save the test results

c) rdquoApplyrdquo and rdquoSaverdquo your settings

5 Run JobClick ldquoBuild Nowrdquo

6 Check Resulta) Click ldquoJob Linkrdquo -gt ldquoConsole Outputrdquo to see the ldquoConsole Outputrdquo

b) According to the above graph the report is gotten at the path of ldquoCVivi_ATAT SourceCodeBPTECS-1711a_Server Configuration_Check Password_CommercialReportrdquo you can check the detail report by using ldquoRun Results Viewerrdquo

c) You can also download the detail your local env

Page 6: Integrate UFT with Jenkins Guide

5 Run JobClick ldquoBuild Nowrdquo

6 Check Resulta) Click ldquoJob Linkrdquo -gt ldquoConsole Outputrdquo to see the ldquoConsole Outputrdquo

b) According to the above graph the report is gotten at the path of ldquoCVivi_ATAT SourceCodeBPTECS-1711a_Server Configuration_Check Password_CommercialReportrdquo you can check the detail report by using ldquoRun Results Viewerrdquo

c) You can also download the detail your local env

Page 7: Integrate UFT with Jenkins Guide

b) According to the above graph the report is gotten at the path of ldquoCVivi_ATAT SourceCodeBPTECS-1711a_Server Configuration_Check Password_CommercialReportrdquo you can check the detail report by using ldquoRun Results Viewerrdquo

c) You can also download the detail your local env

Page 8: Integrate UFT with Jenkins Guide