Configuring the Freestyle project

You must configure a Freestyle project to add a build step, and then run test assets from Jenkins.

Before you begin

You must have completed the following tasks:

  • Installed the Rational® Functional Tester Web UI Jenkins plugin on the Jenkins primary server. See Installing the plugin on the Jenkins primary server.

  • Created an Agent in Jenkins. For more information about creating Agents, refer to the Jenkins documentation.

  • Copied the name of the labels that you provided in the Labels field when you created the Agent.

  • Created a Jenkins Freestyle project.

About this task

When you create a Freestyle project in the Jenkins server, you must select the Restrict where this project can be run checkbox and enter the name of the labels that you provided during the creation of Agent in the Label Expression field.

Procedure

  1. Open the Jenkins Freestyle project, and then click Configure.
  2. Click the Build tab, and then click Add build step.
  3. Select the Run IBM Rational Functional Tester - Web UI test option from the drop-down list.
  4. Provide the details about the test run for the fields as listed in the following table:
    Field Description
    Required
    Name

    The name of the Jenkins build step.

    Workspace

    The complete path to the Eclipse workspace.

    Project

    The path, including the file name of the project relative to the workspace.

    Test Suite Name

    The path, including the file name of the test to run related to the project.

    Note: You must provide the file name along with the file extension if you are using an Accelerated Functional Test suite.

    To run multiple tests of the same project sequentially, you must specify the test names separated by a comma.

    Optional
    IMShared Location

    The complete path to IBMIMShared location, if it is not the default location.

    Var File

    The complete path to the XML file that contains the variable name and value pairs.

    Config File

    The complete path to a file that contains the parameters for a test run.

    Results File

    The name of the results file.

    The default result file is the test or schedule name with a time-stamp appended. The results file is stored in the Results directory. If you are running multiple tests, do not provide a name for the results file.

    Overwrite Results File

    Determines whether a result file with the same name is overwritten. The default value is true, which means the result file can be overwritten.

    VM Args

    The option to pass Java virtual machine arguments.

    Protocol Input

    The option to run a Web UI test in parallel on different browsers.

    For example, Protocol Input is all.available.targets.in.parallel=allProtocol Input is all.available.targets.in.parallel=chrome,ff,ie

    Note: If you use the Protocol Input argument, you must not use the equivalent VM Args arguments:
    VM Args = -Dall.available.targets.in.parallel=all
    VM Args = -Dall.available.targets.in.parallel=browser1,browser2,browser3
    Dataset Override

    For a test, the default value is the dataset specified in the test editor.

    Note: You must use the Dataset Override option to replace the dataset values during a test run. You must ensure that both original and new datasets are in the same workspace and have the same column names. You must also include the path to the dataset.

    For example,

    /project_name/ds_path/ds_filename.csv:/project_name/ds_path/new_ds_filename.csv

    You can swap multiple datasets that are saved in a different project by adding multiple paths to the dataset separated by a semicolon (;).

    Export Report The option to export the unified report of UI tests to the file formats such as PDF, HTML, and XML.
    Note: The exported XML file is a JUnit XML file. You can view this file in applications that support JUnit reporting formats.
    After you select this checkbox, you must choose the following details from the drop-down lists and enter the details:
    • Type: Select unified from the list.

    • Format: Select one of the following formats:

      • xml

      • pdf

      • html

      Note: You must select xml as the format to view the Test Result Analyzer (TRA) reports. If you select the format as html or pdf, you cannot view the TRA-based report.
    • Directory: Enter the directory path where you want to save the exported file.

    • File Name: Enter a name for the exported file.

  5. Optional: Click Add build step again, and provide details for the next test to run multiple tests under the same job.
  6. Click Save.

Results

You have configured the Freestyle project by adding the build step.

What to do next

You can run test assets from the Jenkins server. See Running tests from Jenkins.