HCL OneTest API and Jenkins

When you use Jenkins for the continuous integration (CI) of your application, you can run tests for testing your application. You can run tests created in HCL OneTest API for your application in Jenkins by using the Integration Tester Jenkins Plugin.

Prerequisites

Before you can test by using the Integration Tester Jenkins Plugin, you must complete the following tasks:
  • You must configure a Jenkins primary server and a Jenkins secondary server. This configuration provides a single Jenkins installation on the Jenkins primary server to host multiple Jenkins secondary servers for building and running tests. For more information about the Jenkins primary and secondary server relationship, refer to the Jenkins documentation.
  • You must install the Integration Tester Jenkins Plugin on the Jenkins primary server, and install HCL OneTest API on the Jenkins secondary server, where you can create tests.
  • You can use a Freestyle project. In a Freestyle project, you can create a build step from the Jenkins UI to run the test assets, whereas in the Pipeline project you can use simple text scripts based on the Groovy programming language to run the tests.

Task Flow: Testing with the Integration Tester Jenkins Plugin

You can follow the tasks that are listed in the following table when you want to use the Integration Tester Jenkins Plugin to run tests that you create on HCL OneTest API. The table also provides you the links to the information about the tasks.

Task Location More Information
1 Setting up Jenkins
1.1 Download and install Jenkins. Jenkins servers
1.2 Configure the relationship between the Primary and Secondary Jenkins servers. Jenkins servers Managing nodes
1.3 Create Jenkins agents. Jenkins secondary server Creating agents
2

Install HCL OneTest API on the Jenkins secondary server.

Jenkins secondary server Installation
3

Create tests for your application.

HCL OneTest API Creating and running a test
4 Generate a Jenkins project configuration file for the test. HCL OneTest API Generating a Jenkins project configuration file for running tests or suites
5 Set up the integration with Jenkins by using the Integration Tester Jenkins Plugin. Jenkins primary server Setting up the integration with Jenkins
6 Configure a Jenkins environment to view test results. Jenkins primary server Configuring a Jenkins environment for viewing test results
7 If you want to use a Freestyle project, continue with the following tasks:
7.1

Configure the Freestyle project to run a test by using the Integration Tester Jenkins Plugin.

Jenkins primary server Configuring a Jenkins environment for running tests
7.2

Alternatively, configure the Freestyle project to run a test by using the Ant script from HCL OneTest API.

Jenkins primary server Configuring the Freestyle project by using the Ant script
7.3 Run HCL OneTest API tests on Jenkins. Jenkins primary server Running tests from Jenkins
7.4 View results of the test run by using any of the following methods:
  • Jenkins Dashboard
  • Test Results Analyzer plugin
Jenkins primary server Viewing test results in Jenkins