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.
Before you begin
- Install 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.
- Download the ant plugin for HCL OneTest™ UI from HCL® License & Delivery portal and install Ant on to the computer where HCL OneTest™ UI is installed.
Procedure
-
Extract the following files from the downloaded plugin:
- HOT-UI-Ant-FunctionalTest-3.1.jar
- HOT-UI-Ant-FunctionalTest.xml
- README.txt
-
Open the HOT-UI-Ant-FunctionalTest.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: Default, XML, HTML, text, and TPTP. - iterationCount Optional. The number of dataset iterations to be run. - userArgs Optional. Additional playback arguments, if any. - 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.
- Navigate to the download directory and verify that it includes the HOT-UI-Ant-FunctionalTest.xml file.
-
Type ant -f HOT-UI-Ant-FunctionalTest.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-FunctionalTest-3.1 from where the ant command is executed.