Child pages
  • HPE Application Automation Tools

Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Plugin Information

View Micro Focus Application Automation Tools on the plugin site for more information.

This plugin allows Jenkins to trigger HP(E) tests such as: Test sets on Application Lifecycle Management, tests running on Mobile Center, tests saved on the file system from Unified Functional Testing or LoadRunner scenarios, and test running with Service Virtualization.

This plugin is open source. If you identify any issues or want to submit enhancement requests, please use JIRA. The component for this plugin is the hp-application-automation-tools-plugin component. Your feedback and involvement will allow us to stabilize and enhance the capabilities of the plugin.

Content Security Policy

Starting with version 1.641 (or 1.625.3), Jenkins introduced the Content-Security-Policy header. This causes some of the integration links, such as links to reports, to become inoperable. For details, see Configuring Content Security Policy and Changes in Jenkins to reduce XSS vulnerabilities . For suggested workarounds until the issue is resolved, see #Content Security Policy Header.

What's New

Version 5.0 of the plugin contains the following enhancements:

  • Support for Jenkins 2.0
  • #Support for Pipelines (See #Supported Pipeline job types)
  • Integration with Service Virtualization
  • New Cross-run / Build report – project level performance report (LoadRunner)
  • Improved support in running scenarios / scripts from GitHub (LoadRunner)

This plugin allows you to trigger an HPE(E) test as a build step and present the results in the Jenkin's UI, similar to JUnit.

This plugin currently supports:
 * HPE Unified Functional Testing 11.50 and 12.xx (QuickTest Professional and Service Test 11.50 capabilities)
 * HPE LoadRunner 11.52 and 12.xx
 * HPE Performance Center 12.xx (12.53 required for trend reports)
 * HPE Application Lifecycle Management 11.00, 11.52, and 12.xx
 * HPE Mobile Center 2.0, 2.01
 * HPE ALM Lab Management 11.50, 11.52, and 12.xx
 * HPE Quality Center 10.00, with the QuickTest Professional Add-in for triggering test sets
 * HPE Service Test 11.20 and 11.50
 * HPE QuickTest Professional 11.00
 * HPE Service Virtualization 3.80-3.83

If you are working with Quality Center 10.00 or earlier, and QuickTest Professional 9.x or 10.x, use the Quality Center Plugin.



User Guide

You can run client side-or server-side (Default or Functional) test sets and build verification suites from Application Lifecycle Management (ALM) or functional tests from the file system.

Prerequisites

  1. Java version 6 or higher. To verify your Java version, go to http://www.java.com/en/download/installed.jsp.
  2. ALM/Quality Center client installed the machine that will run the tests. To check if you have a client installed, follow the instructions on this page:  http://:8080/qcbin/TDConnectivity_index.html
  3. For running UFT tests from ALM install the ALMClient in common registration mode by accessing the following link from an Internet Explorer browser on the UFT machine: 


Terminology Changes

In Jenkins version 2.0, several terms used by the Jenkins interface changed. For example, instead of New Job, the link changed to New Item, requiring you to enter an Item name. The General tab replaces the Project Configuration tab. The procedures below reflect the pre-2.0 versions of Jenkins.


Configuring the Connection to Your ALM Server

  1. Go to the Jenkins Server home page.
  2. Click the Manage Jenkins link in the left pane. 
  3. In the Manage Jenkins Page click Configure System.
  4. In the Configuration tab, scroll down to the Application Lifecycle Management section.
  5. Click Add ALM server, if no server is currently configured.
  6. Specify a meaningful server name and URL. When specifying an ALM Server URL, use the full string: http:/myserver.mydomain:8080/qcbin



Running Tests Sets from ALM

 Set up a job

  1. Go to the Jenkins Server home page.
  2. Click the New Job link or select an existing job.
  3. Enter a Job name (for a new job).
  4. Select Build a free-style software project and click OK.
  5. In the Project Configuration section scroll down to the Build section.
  6. Expand the Add build step drop-down and select Execute HPE tests from HPE ALM.
  7. Select one of the ALM servers that you configured in the previous step.
  8. Enter the server credentials, project and domain. Note: If you are using the ALM scheduler, it will run under the Jenkins agent user. For example, if Jenkins is running as a System user, the scheduler will run the tests as a System user. This will not affect test execution. 
  9. Add the test set folders or specific test sets that you want to include, using the ALM path. To add multiple entries, click the down arrow on the right of the field and enter each item on a separate line. For example:
    Root\testfolder1\testset_a
    Root\testfolder1\testset_b
    Root\testlab_folder
    


  1. Optionally, indicate a timeout in seconds after which the job will fail. 
  2. Click Advanced to indicate a Run mode (local, remote, or planned host) If you specify a remote host mode, specify a host name. This must be a machine with a valid installation of the testing tool.
  3. Click Apply to save your changes and continue with more build steps. Click Save when you are finished adding build steps.

Set up the Post Build actions

  1. In the Post-build Actions section, expand the Add post-build action drop-down and select Publish HPE test result.
    Run the job
  2. Run or schedule the job as you would with any standard Jenkins job. 

Review the results

  1. From the dashboard, click on the job.
  2. Click the Console link to view the ALM information.
  3. Copy the ALM link to your Internet Explorer browser and view the Test Set results from within ALM.



Running Server Side Tests Using HPE ALM Lab Management

If you have Lab Management activated in ALM, you can run server-side tests from functional test sets and build verification suites. After setting up the test sets and build verification suites, you can configure a Jenkins build step to execute your tests.

Set up a job

  1. Go to the Jenkins Server home page.
  2. Click the New Job link or select an existing job.
  3. Enter a Job name (for a new job).
  4. Select Build a free-style software project and click OK.
  5. In the Project Configuration section scroll down to the Build section.
  6. Expand the Add build step drop-down and select Execute HPE tests using HPE ALM Lab Management.
  7. Select one of the ALM servers that you configured in the previous step.
  8. Enter the server credentials, project and domain. 
  9. Optional: If you're using proxy, you can configure the proxy settings.
  10. Select a Run Type from the drop down menu (functional test set or build verification suite).
  11. Enter the ID of your run entity (either the test set ID or the build verification suite ID).
  12. Optional: Enter a description of the build step.
  13. Enter a duration (in minutes) for the timeslot. The minimum time is 30 minutes.
  14. Optional: If you have defined an AUT environment configuration in ALM, you can enter the ID here in order to execute your timeslot with specific AUT parameters.
    If you have CDA configured in ALM and want to implement it for this timeslot, select the Use CDA for provisioning and deployment checkbox and enter your CDA details.
    Set up the Post Build actions
  15. In the Post-build Actions section, expand the Add post-build action drop-down and select Publish HPE test result.

Run the job

  1. Run or schedule the job as you would with any standard Jenkins job. 

Review the results

  1. From the dashboard, click on the job.
  2. Click the Console link to view the ALM information.
  3. Copy the ALM link to your Internet Explorer browser and view the Test Set results from within ALM.

Note: For environments with Internet Explorer 9 and ALM version 12.20 or later: The report, normally accessible through a link in the console log, will not be available.


Creating/Updating the AUT Environment Configuration Using HPE ALM Lab Management

If you have Lab Management activated in ALM, you can create/update an AUT Environment Configuration for an existing AUT Environment in ALM.
 Set up a job

  1. Go to the Jenkins Server home page.
  2. Click the New Job link or select an existing job.
  3. Enter a Job name (for a new job).
  4. Select Build a free-style software project and click OK.
  5. In the Project Configuration section scroll down to the Build section.
  6. Expand the Add build step drop-down and select Execute AUT Environment preparation using HPE ALM Lab Management.
  7. Select one of the ALM servers that you configured in the Configure the connection to your ALM server step.
  8. Enter the server credentials, project name, and domain. 
  9. Enter the ID of the environment for which you want to create/update a configuration.
  10. Select one of the following options to Indicate whether or not to create a new AUT Environment Configuration or update an existing one.
    1. For Create a new configuration named, enter a name for the new configuration.
    2. For Use an existing configuration with ID, enter the ID of your AUT Environment Configuration in ALM.
  11. Optional: Enter a path for a JSON file that contains values for the AUT Environment parameters for the relevant configuration.
  12. Optional: Enter a name of a build environment parameter in order to save the ID of the created/updated configuration for future use.
  13. Add the AUT Environment parameters that you want to update for the created/updated configuration. For each parameter:
    1. Select the type of the parameter from the drop-down menu (Manual, Environment, From JSON).
    2. Enter the full path of the parameter as it appears in ALM.
    3. Enter the value you want to assign to this parameter.

Run the job

  1. Run or schedule the job as you would with any standard Jenkins job. 



Uploading Test Results to ALM

You can upload tests running in JUnit, NUnit, or TestNG frameworks to ALM as part as the run job or as a separate job. ALM will create tests and test sets (of External type) corresponding to the executed tests.

 Set up a job

  1. Go to the Jenkins Server home page.
  2. Click the New Job link or select an existing job.
  3. Enter a Job name (for a new job).
  4. Select Build a free-style software project and click OK.

Set up the Post Build actions

  1. In the Project Configuration section, scroll down to the Post-build Actions section.
  2. Expand the Add post-build action drop-down and select Upload test result to ALM.
  3. Select one of the ALM servers that you configured in the Configure the connection to your ALM server step.
  4. Enter the server credentials, project name, and domain. 
  5. Select a testing framework from the drop-down list: JUnit, NUnit, or TestNG.
  6. Optional: Enter the name of the Testing Tool name, to be used in the corresponding entity in ALM.
  7. Enter the ALM Test folder path, in which to store the external tests. Do not include the Root test folder (Subject).
  8. Enter the ALM Test Set folder path, in which to store the external test sets. Do not include the Root test sets folder.
  9. Enter the Testing result file condition, relative to the root path of the job. For example, use **/junitResult.xml for Junit Plugin results.
  10. Optional: Enter the Jenkins server URL.

Run the job

  1. Run or schedule the job as you would with any standard Jenkins job. 

Review the results

  1. From the dashboard, click on the job.
  2. Click the Console link to view the ALM information.
  3. Copy the ALM link to Internet Explorer and view the tests, test sets, and test runs that were created within ALM.



Running Functional Tests from the File System


 Set up a job

  1. Go to the Jenkins Server home page.
  2. Click the New Job link or select an existing job.
  3. Enter a Job name (for a new job).
  4. Select Build a free-style software project and click OK.
  5. In the Project Configuration section, scroll down to the Build section.
  6. Expand the Add build step drop-down and select Execute HPE tests from file system.
  7. In the Tests box, enter a test with its full absolute path, or a folder or MTB containing one or more tests. 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 more options, see the Tip below.
  8. Indicate a timeout in seconds after which the job will fail in the Timeout box (optional). 
  9. Click Apply to save your changes and continue with more build steps. Click Save when you are finished adding build steps.

Tip: You can also indicate a batch file that contains a list of tests, along with their parameters. You can specify multiple tests, or the same test several times with different parameters. Note that you can use Jenkins environment variables in the path names. The batch file should have an .mtbx extension and follow this sample syntax.

<Mtbx>
	<Test name="test1" path="c:\tests\APITest1">
 	<Parameter name="A" value="abc" type="string"/>
   	 ….
  	</Test>
  	<Test name="test2" path="${WORKSPACE}\test2">
    	<Parameter name="p1" value="123" type="int"/>
    	<Parameter name="p4" value="123.4" type="float"/>
   	….
  	</Test>
</Mtbx>

Set up the Post Build Actions

  1. In the Post-build Actions section, expand the Add post-build action drop-down and select Publish HPE test result.
  2. Select an archiving option for the test run results:
    • Archive HPE test reports for failed tests_  only save test result reports for failed tests.
    • Always archive HPE test reports  - always save test result reports.
    • Do not archive HPE test reports - never save the test results.

Run the job

  1. Run or schedule the job as you would with any standard Jenkins job.

Review the results

To generate an HTML report:

  1. Click on the UFT Report icon in the left toolbar. The UFT report page opens with a table listing the test runs (test name, status, link to the report, etc.)
  2. Click on a link to open the desired report:
    • HTML Report: The browser opens the HTML report.
    • Run Results Report: The download of the zip file begins. Extract its contents.The extracted zip file contains the result files, viewable in the Run Results Viewer.


To view the results in the Run Results Viewer:

  1. Open the Run Results Viewer and select File > Open.
  2. In the Open dialog box, select` Results XML file and navigate to the Results.xml file in the folder that you extracted.
  3. Click Open and view the results.

Note: if you are viewing the log for this build job, you will see a number of timeout messages displayed, including PerScenarioTimeout and FileSystemTestRunner. The PerScenarioTimeout can be ignored as it is only relevant for LoadRunner tests.


Running Functional Tests on devices through Mobile Center


 Configure Jenkins

  1. Install the "HPE Application Automation Tools" plugin. (Manage Jenkins > Manage Plugins)
  2. On the Jenkins Server home page, click Manage Jenkins > Configure System.
  3. In the Mobile Center section, click Add MC server
  4. Enter a meaningful name for the Mobile Center server that you will be using, and its URL.
  5. Repeat the last two steps for each of the Mobile Center servers that you will be accessing.
  6. Define a UFT slave machine (relevant only is UFT and Jenkins are hosted on separate machines)
    1. Select Manage Jenkins > Manage Nodes > New Node.
    2. Give the new node a name and select the Dumb Slave option.
    3. Enter the details for the UFT machine.
    4. Save your changes. For details, see https://wiki.jenkins-ci.org/display/JENKINS/Step+by+step+guide+to+set+up+master+and+slave+machines.


 Set up a job

  1. On the Jenkins Server home page, click the New Job link.
  2. Enter a Job name (for a new job).
  3. Select Build a free-style software project and click OK.
  4. In the Project Configuration section, scroll down to the Build section.
  5. Expand the Add build step drop-down and select Execute HPE tests from file system.
  6. Enter the Mobile Center details:
    • Select the MC server from the drop down list.
    • Provide the user credentials for the Mobile Center server.
    • Click the Wizard button. In the Mobile Center wizard, select a device, apps, and settings for your test.
  7. In the Tests box, enter a test with its full absolute path, or a folder or MTB containing one or more tests. 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 more options, see the Tip below.
  8. Indicate a timeout in seconds after which the job will fail in the Timeout box (optional). 
  9. Click Apply to save your changes and continue with more build steps. Click Save when you are finished adding build steps.

Tip: You can also indicate a batch file that contains a list of tests, along with their parameters. You can specify multiple tests, or the same test several times with different parameters. Note that you can use Jenkins environment variables in the path names. The batch file should have an .mtbx extension and use the same syntax as this sample.

<Mtbx>
 <Test name="test1" path="c:\tests\APITest1">
	</Test>

 <Test name="test2" path="${WORKSPACE}\test2">
	</Test>
</Mtbx>


 Set up the Post Build Actions

  1. In the Post-build Actions section, expand the Add post-build action drop-down and select Publish HPE test result.
  2. Select the archiving option Always archive HPE test reports.

Run the job
Run or trigger the job as you would with any standard Jenkins job. The results are displayed in the same manner as a regular functional test. For details on viewing the run results, see the section above on running functional tests from the file system.

To troubleshoot, check the log file on the Mobile Center server for connectivity issues, security issues, and so forth.


Uploading Apps to Mobile Center

This add-in provides a standalone builder for uploading apps to Mobile Center.

  1. Make sure to add your MC server to the Jenkins configuration as described in the Running Functional Tests on devices through Mobile Center section above.
  2. On the Jenkins Server home page, click the New Job link.
  3. Enter a Job name (for a new job).
  4. Select Build a free-style software project and click OK.
  5. In the Project Configuration section, scroll down to the Build section.
  6. Expand the Add build step drop-down and select Upload app to Mobile Center.
  7. Select your Mobile Center server from the drop-down list of servers, and provide your login credentials.
  8. Click Add Application and enter the full path of the apk or ipa package file of the app you want to upload to the MC server. The app should be on the Jenkins Master machine. Repeat this step for each app you want to upload.
  9. Click Apply to save your changes and continue with more build steps.
  10. Click Save when you are finished adding build steps.

Running LoadRunner Scenarios from the File System

 Set up a job

  1. Go to the Jenkins Server home page.
  2. Click the New Job link or select an existing job.
  3. Enter a Job name (for a new job). # Select Build a free-style software project and click OK.
  4. In the Project Configuration section, scroll down to the Build section.
  5. Expand the Add build step drop-down and select Execute HPE tests from file system.
  6. Click the LoadRunner-Specific Settings button and specify the following settings:
    1. Controller Polling Interval. The interval in seconds by which to poll the Controller for the scenario status. The default is 30 seconds.
    2. Scenario Execution Timeout. The total time in seconds to allot for the execution of all listed scenarios. After this time, the Controller process will be terminated.
    3. Errors to Ignore. You can specify which errors to ignore during the run. For example: Error: CPU usage for this load generator has exceeded 80%. Enter each error string on a separate line.
  7. In the Tests box, enter a test with its full absolute path, or a folder or MTB containing one or more tests or LoadRunner 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.
  8. Indicate a timeout in seconds after which the job will fail in the Timeout box (optional). 
  9. Click Apply to save your changes and continue with more build steps. Click Save when you are finished adding build steps.

Set up the Post Build Actions

  1. In the Post-build Actions section, expand the Add post-build action drop-down and select Publish HPE test result.
  2. Select an archiving option for the test run results:
    • Archive HPE test reports for failed tests_  only save test result reports for failed tests.
    • Always archive HPE test reports  - always save test result reports.
    • Always archive and publish HPE test reports   - always save and publish test result reports.
    • Do not archive HPE test reports - never save the test results.


Run the job
Run or schedule the job as you would with any standard Jenkins job.


Review the results in the Run Results Viewer  

  1. Extract the files from the archive file. When you when you extract the zip file contents, it creates the following folders and files:
    • LRR folder- The Controller raw result folder, viewable in LoadRunner Analysis.
    • LRA folder- The Analysis session folder, viewable in LoadRunner Analysis.
    • HTML folder- HTML reports in two subfolders, IE and Netscape, in their respective formats.
    • SLA.xml - An XML report showing the status of the SLA in the test.
  2. Open the Run Results Viewer and select File > Open.
  3. In the Open dialog box, select` Results XML file and navigate to the Results.xml file in the folder that you extracted.
  4. Click Open and view the results.

Note: The pass and fail criteria for LoadRunner scenario tests are based on the LoadRunner Service Level Agreement (SLA). If you do not define an SLA, the scenario will fail. For details, see the LoadRunner Help Center.


Review the results in Jenkins  

You can also view the results from the Jenkins interface, in the following modes:

  • Per job/project
  • Per build/run

Per Job / Project (cross build / run results)

Click Project performance report in the left side Job menu. This lets you review the various results from the job, per scenario. You compare the job results using an SLA.

Per build / run 

  1. Click Performance report to examine the performance summary report with its different results.
  2. Click Transaction summary to open a detailed view of the transactions statistics taken directly from LoadRunner Analysis report.
  3. Click Simple Junit style SLA result
    1. Click on “Test result”
    2. Click on “All tests” to see the overview.
    3. Select a scenario by clicking on its name.
    4. Click on History in the left panel to compare the results with those from previous runs.

Note: These reports might require you to perform a Security header override. For details, see #Content Security Policy Header.


Running Performance Tests using HPE Performance Center

Set up a job

  1. Go to the Jenkins Server home page.
  2. Click the New Job link or select an existing job.
  3. Enter a Job name (for a new job).
  4. Select Build a free-style software project and click OK.
  5. In the Project Configuration section scroll down to the Build section.
  6. Expand the Add build step drop-down and select Execute HPE tests using HPE Performance Center.
  7. Optional: Enter a description of the build step.
  8. Enter a PC Server (Hostname or IP address)
  9. Enter the server credentials, project and domain.
  10. Enter the Test ID and the Test Instance ID. To get the IDs, go to PC Web UI (MyPC) > Test Lab perspective > Performance Test Set table.
    If either of the columns is not visible, click the Selected columns button , select the desired columns, and click OK.
  11. Choose a post run action (Collate Results/Collate and Analyze/Do Not Collate)
  12. Choose whether to add the run to a trend report, and specify the trend report ID (supported for version 12.53 and higher).
  13. Enter a duration for the Ad-Hoc timeslot. The minimum time is 30 minutes.
  14. Choose whether to use VUDs licenses.
  15. Choose whether to consider the run SLA status for determining the build-step status. Unless this option set, the build-step will be labeled as Passed as long as no failures occurred.

Set up the Post Build actions

  1. In the Post-build Actions section, expand the Add post-build action drop-down and select Publish HPE test result.
  2. Select a report archive mode.

Run the job

  1. Run or schedule the job as you would with any standard Jenkins job.

Review the results

  1. From the dashboard, click on the job.
  2. Click the Console link to view the PC run information.
  3. When the Collate and Analyze option is set as the post run action, the Performance Center HTML report can be viewed and downloaded directly from Jenkins via the Build Artifacts or Test Result options.



Running tests with Service Virtualization

Before you begin setting up a job in Jenkins, make sure you prepare your virtual services and other prerequisites as described in the Service Virtualization Help Center.

Configure the connection to your Service Virtualization Server

  1. Install the "hpe Application Automation Tools" plugin. (Manage Jenkins > Manage Plugins)
  2. Go to the Jenkins Server home page.
  3. Click the Manage Jenkins link in the left pane.
  4. In the Manage Jenkins Page click Configure System.
  5. In the Configuration tab, scroll down to the Service Virtualization section.
  6. Click Add SV server.
  7. Specify Service Virtualization Server details. The Server URL must be in the following format:
    <scheme>://<Service Virtualization Server IP or hostname>:<port number>/management
    For example:https://agata:6085/management

Set up a build job to use a virtual service in a test

  1. Go to the Jenkins Server home page.
  2. Click the New Job link or select an existing job.
  3. Enter a Job name (for a new job).
  4. Select Build a free-style software project and click OK.
  5. Under Source Control Management, specify source control for checking out your tests and virtual service files.
  6. In the Project Configuration section scroll down to the Build section.
  7. Add Service Virtualization build steps as needed. Expand the Add build step drop-down and select a step:
    • SV: Deploy Virtual Service
    • SV: Undeploy Virtual Service
    • SV: Change Mode of Virtual Service
    • SV: Export Virtual Service
  8. Click Apply to save your changes and continue with more build steps.
  9. If you used the SV: Export Virtual Service build step, you may need to store the exported virtual service using a Post-build Action.
  10. Click Save when you are finished adding build steps.

Run the job
Run or schedule the job as you would with any standard Jenkins job.



Support for Pipelines

Generate pipeline code

To set up a pipeline test job for your HPE tool:

    1. From Jenkins Dashboard. click New Job or select an existing one.
    2. On the page that opens, enter a job name (for a new job), click Build a Pipeline project, and click OK.
    3. In the Project Configuration page, scroll down to the Pipeline section.
    4. Enter the stage and node arguments into the Script area. For example,
      stage('RunUFTTestFromFS'){ // The stage name
          node('Test'){ //  The name of the node in which to run the test.
      
  1. Prepare the code for your testing tool:
    1. Click the Pipeline Syntax link.
    2. In the Snippet Generator drop down, select the desired step, for example, uftScenarioLoad: Run UFT scenario.
    3. Fill in the fields as required. Fields marked in red are mandatory. Note: For fields that take multiple values, such as in the Tests field, separate multiple entries with a line break.
    4. If relevant, select one of the #Report archive modes.
    5. Click Generate Pipeline Script. Copy the code to the clipboard.
  2. Return to the Project Configuration page, and paste the generated Groovy script into the Script field in the Pipeline section.
  3. Repeat the above steps to add other commands to your script.
  4. Save the script and run or schedule the job as you would with any standard Jenkins job.
  5. After the test run, click the Console link on the dashboard to see a link to your results. Copy the link to your browser (Internet Explorer required to view ALM test sets in ALM).
Supported Pipeline job types

The available Pipeline job types are loadRunnerTest, uftScenarioLoad, runFromAlmBuilder, sseBuild, sseBuildAndPublish, pcBuild, svChangeModeStep, svDeployStep, svExportStep, and svUndeployStep.

Product

Pipeline step name

Description

LoadRunner

loadRunnerTest

Run LoadRunner performance tests from a file system scenario file

UFT

uftScenarioLoad

Run a UFT scenario from file system scenario

ALM

runFromAlmBuilder

Execute HPE functional tests from HPE ALM

ALM Lab Management

sseBuild

Execute HPE tests using ALM Lab Management

ALM Lab Management

sseBuildAndPublish

Execute HPE tests using ALM Lab Management and Publish HPE tests result

Performance Center

pcBuild

Execute HPE tests using HPE Performance Center

Service Virtualization

svChangeModeStep

Change the mode of a Virtual Service

Service Virtualization

svDeployStep

Deploy a Virtual Service

Service Virtualization

svExportStep

Export a Virtual Service

Service Virtualization

svUndeployStep

Undeploy a Virtual Service

Pipeline jobs are not supported for Mobile Center uploads, ALM test uploader, and ALM AUT job types.

Report archive modes

The available archive modes are:

  • Archive HPE test report for failed tests
  • Always archive HPE test reports
  • Always archive and publish HPE test reports (LR only)
  • Do not archive HPE test reports



Enabling Non-English Languages

In order to allow the add-in to support non-English languages, make the following changes to your Jenkins Master and nodes configuration:

Master configuration
  1. Open the Jenkins.xml file in the Jenkins installation folder, for example: c:\Jenkins\Jenkins.xml.
  2. Go to the <service> -> <arguments> section and add the -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 flags after the -jar flag.

For example:

<service>
  <id>jenkins</id>
  <name>Jenkins</name>
  <description>This service runs Jenkins continuous integration system.</description>
  <env name="JENKINS_HOME" value="%BASE%"/>
  <!--
    This example assumes that you have java in your PATH.
    To run Jenkins with a specific version of Java, specify a full path to the desired java.exe.
  -->
  <executable>%BASE%\jre\bin\java</executable>
  <arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 "%BASE%\jenkins.war" --httpPort=8080 --webroot="%BASE%\war"</arguments>
  <!--
    The *interactive* flag causes the empty black Java window to be displayed.
    <interactive />
  -->
  <logmode>rotate</logmode>
  <onfailure action="restart" />
</service>
Slave configuration
  1. Open the jenkins-slave.xml file on the Jenkins slave machine in the folder that you designated.
  2. Go to the <service> -> <arguments> section and add the -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 flags after the -jar flag.
<service>
  <id>jenkinsslave-c__jkns</id>
  <name>jenkinsslave-c__jkns</name>
  <description>This service runs a slave for Jenkins continuous integration system.</description>
  <!--
    This example assumes that you have java in your PATH.
    To run Jenkins with a specific version of Java, specify a full path to the desired java.exe.
  -->
  <executable>C:\Program Files (x86)\Java\jre1.8.0_91\bin\java.exe</executable>
  <arguments>-Xrs  -jar "%BASE%\slave.jar" -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 -jnlpUrl http://xxx.xxx.xxx.xxx:8080/jenkins/computer/VM112233/slave-agent.jnlp -secret xyzabc</arguments>
  <!--
    The *interactive" flag causes the empty black Java window to be displayed.
    <interactive />
  -->
  <logmode>rotate</logmode>
  <onfailure action="restart" />
</service>
Configuration for Java Web Start clients
  1. On the Jenkins master machine, go to Manage Jenkins -> Manage Nodes. Click the relevant node or slave. and select Slave -> Configure -> Advanced.
  2. Add the following to the JVM options text box – “-Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8”.
  3. Restart your Jenkins master, node, and slave.
  4. Verify that your changes took effect:
    1. For the Master: Go to Manage Jenkins -> System information -> “file.encoding”, “sun.jnu.encoding”. The value should be “UTF-8”.
    2. For the node/slave: On the master machine, go to Manage Jenkins -> Manage Nodes.
      Click on the relevant node or slave and select System information-> “file.encoding”, “sun.jnu.encoding”. The value should be “UTF-8”.
      Workaround: If you find that the slave machine still does not support localized encoding, launch the slave from the command line as shown in the image below:

     For example:

java -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 -jar slave.jar -jnlpUrl http://xxx.xxx.xxx.xxx:8080/jenkins/computer/VM112233/slave-agent.jnlp -secret xyzabc

     


Tips and Troubleshooting

Integration Issues
  • If your job includes UFT, QTP, or Service Test tests running on a remote ALM/QC machine (run mode = Run Remotely), you should manually stop the test execution.
  • When UFT is installed on the slave machine (node), the LoadRunner test job will fail in the Analyze Result stage. Workaround: Add the path of the LoadRunner bin folder (%LR_PATH%/bin) to the PATH environment variable.
Content Security Policy Header

Starting with version 1.641 (or 1.625.3), Jenkins introduced the Content-Security-Policy header. This prevents some of the links that appear in the integration to become inoperable. For example, the links to the LoadRunner Performance and UFT HTML reports will not work.
Workarounds:

  • View the reports locally on the slave machine, in your Jenkins results folder under the relevant build ID, or on the master machine in the Jenkins builds folder.
    • For UFT HTML reports, go to the %jenkins% \jobs\<job_name>\builds\<job_count>\archive\UFTReport folder. For example, C:\Program Files (x86)\Jenkins\jobs\Uft-htmlReport\builds\80\archive\UFTReport\GuiTest2\run_results.html.
    • For LoadRunner Performance reports, go to the %jenkins% \jobs\<job_name>\builds\<job_count>\PerformanceReport folder. For example, C:\Program Files (x86)\Jenkins\jobs\Plug_Debug\builds\5\PerformanceReport\index.html.
  • Click Manage Jenkins > Script Console, and run one of the following scripts from the console:
    • For UFT HTML reports, type the following line and press Run.
      System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "")
    • For LoadRunner Performance reports, type the following line and press Run.
      System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "sandbox; default-src 'none'; img-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'; child-src 'self';")
    • Another option for LoadRunner Performance reports that is more secure, but it disables the left pane menu and embedded Javascript:
      System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "sandbox; default-src 'none'; img-src 'self'; style-src 'self'; script-src 'self'; child-src 'self';")
Slaves and Testing Tools Installation

For best performance, it is recommended to install the testing tools and ALM/QC on slave machines, and not directly on the Jenkins server.  For instructions on configuring slave machines, see
https://wiki.jenkins-ci.org/display/JENKINS/Step+by+step+guide+to+set+up+master+and+slave+machines.
On the Jenkins slave machine, make sure the the Jenkins Slave service is not logged in with the Local System account. To function properly, it should log in with an account the has administrator privileges.

  • No labels