Testing with Ant

You can use ant to run functional tests from the command line. Starting with version 2.0 of the ant plugin, you can run multiple tests simultaneously. Version 2.0 of the ant plugin is supported in HCL OneTest™ UI 9.2 and newer.

Before you begin

  • Install IBM® Installation Manager.
  • Install HCL OneTest UI.
  • Verify that you have a functional test residing within an Eclipse workspace on the computer where HCL OneTest UI is installed.
  • Be sure ant is installed and added to the PATH environment variable.


  1. Download the ant plugin for HCL OneTest UI from HCL License & Delivery Portal on to the computer where HCL OneTest UI is installed.
  2. Extract the following files from the downloaded plugin:
    • HOT-UI-Ant-2.0.jar
    • ExecuteFunctionalTest.xml
    • README.txt
  3. Open the ExecuteFunctionalTest.xml file and provide parameter values, as shown in the following example:
    <ft name="test1" projectDir="C:\workspace\Project" scriptName="Script1" />

    To run multiple tests, add additional <ft> tasks and provide details for each test.

    The following table explains each parameter.

    Parameter Description
    -name Required. Name of the test.
    - projectDir Required. The fully qualified path to the HCL OneTest UI project directory. Use '\\' or '/' as the file separator.
    - scriptName Required. The name of the script to be run.
    - logFormat Optional. The format of the logs that are created when the script is run. The options are: xml, html, text, and TPTP.
    - iterationCount Optional.. The number of datapool iterations to be run.
    - userArgs Optional. Additional playback arguments, if any.
  4. Open a command prompt as an administrator or a root user. This applies even when you have logged into a test machine with administrator privileges.
  5. Navigate to the download directory and verify that it includes the ExecuteFunctionalTest.xml file.
  6. Type ant -f ExecuteFunctionalTest.xml to start test execution.

    When ant execution completes, a test result is displayed. Ant execution output is logged into the logfile.txt file, and a test log is created in a temp directory under HOT-UI-Ant-2.0 from where the ant command is executed.