Testing with Ant

You can use ant to run functional tests from the command line of HCL DevOps Test UI (Test UI). Starting with version 2.0 of the ant plugin, you can run multiple tests simultaneously.

Before you begin

  • Verify that you have a functional test residing within an Eclipse workspace on the computer where Test UI is installed.
  • Be sure ant is installed and added to the PATH environment variable.
  • Download the ant plugin for Test UI from HCL® License & Delivery portal and install Ant on to the computer where Test UI is installed.

Procedure

  1. Extract the following files from the downloaded plugin:
    • DTUI-FunctionalTest-Ant-HCL-4.0.jar
    • DTUI-FunctionalTest-Ant-HCL.xml
    • README.txt
  2. Open the DTUI-FunctionalTest-Ant-HCL.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 Test 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: Default, XML, HTML, text, and TPTP.
    - iterationCount Optional. The number of dataset iterations to be run.
    - userArgs Optional. Additional playback arguments, if any.
  3. 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.
  4. Navigate to the download directory and verify that it includes the DTUI-FunctionalTest-Ant-HCL.xml file.
  5. Type ant -f DTUI-FunctionalTest-Ant-HCL.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 DTUI-FunctionalTest-Ant-IBM-4.0 from where the ant command is executed.