Testing with Jenkins

You can use the Jenkins plugin for HCL OneTest™ UI to run tests on a Jenkins server by using a Jenkins build step.


To automate testing with Jenkins, you must configure two computers: a Jenkins master and a slave. This master and slave configuration allow a single Jenkins installation on the master computer to host multiple slave environments for building and running tests. You must install the latest version of the Jenkins plugin for HCL OneTest UI on the master computer and install HCL OneTest UI itself on the slave, where you create the tests. For more information on Jenkins master-slave relationship, see Distributed Builds.

  • Jenkins 2.0 plugin is now available and can work with the current as well as the previous versions of HCL OneTest UI.
  • The Jenkins plugin works only with HCL OneTest UI Eclipse integration.

Before you begin

You must have completed the following tasks:

  • Installed IBM® Installation Manager which is required to install HCL OneTest UI.
  • Installed HCL OneTest UI.
  • Verified that you have a Jenkins master computer where Jenkins and the Jenkins plugin for HCL OneTest UI are installed.
  • Verified that you have a Jenkins slave computer where HCL OneTest UI is installed.
  • Verified that you have a functional test residing within an Eclipse workspace where HCL OneTest UI is installed.

Installing the HCL OneTest UI Jenkins plugins on the Jenkins master computer

  1. Download HCL OneTest UI Jenkins plugin from HCL License & Delivery Portal.
  2. From the Jenkins dashboard, install the Jenkins plugin for HCL OneTest UI.
  3. Configure Global Security to allow Random TCP Ports for Java™ Network Launch Protocol (JNLP) agents.

Configuring a job

  1. Create a Jenkins free-style software project. For more information, see Building a software project.
  2. From the Jenkins dashboard, click Build > Add build step and click Run a HCL OneTest UI test.
  3. Enter the details for the test run.

    Test run fields

    The following table explains each field:

    Field Description
    Name Required. The name of the HCL OneTest UI test.
    Project Directory Required. The fully qualified path to the HCL OneTest UI project directory. You must use '\\' or '/' as the file separator.
    Script Name Required. The name of the script to be run.
    Log Format Optional. The format of the script run logs. The options are XML, HTML, text, and TPTP.
    Iteration Count Optional. The number of datapool iterations to be run.
    User Arguments Optional. Additional playback arguments, if any. If there are multiple arguments, you must use a comma to separate them.
    Project Dependencies Optional. The complete path to the project that your test depends for the run. If there are multiple projects, you must separate each project path with a semicolon.
  4. Click Save to save the build step configuration.
  5. To run multiple tests under the same job, click Add build step again and enter the details for the next test.

Master-slave configuration

Master and slave configurations are supported by the Jenkins plugin.

While creating a job configuration, you must also provide the name or label of the slave node as a label expression in the Restrict where this project can be run field. The products are installed and the tests are run from this location.

Running tests

After creating a job (project), you must open the project and click Build Now. This action starts the test run on the slave computer.

Build result and logs

  1. After the build completes, click the build number and open the console for the project. You must look for Test Result to check the test execution status.
    Note: If you add multiple build steps to run multiple tests, then multiple test results are available.
  2. For product logs, you must log in to the slave machine and search for the Jenkins slave workspace or temporary directory.