Running test suites from the command line

You can integrate test suites created with HCL OneTest Embedded for Eclipse IDE into your command line tool chain.

About this task

To run the test suite in command line mode, a Perl launcher script launches the Eclipse workbench silently. In this mode, the Eclipse workbench is not started and there is no user interaction. All information is output to the console.

The launcher script is located in the bin folder of the HCL OneTest Embedded installation directory. This folder directory is added to the PATH environment variable when the product is installed.

Procedure

To run a test suite from the command line:
  1. Close HCL OneTest Embedded for Eclipse IDE.
    The Eclipse workspace must not be in use when you run the command line.
  2. Type the following command line:

    rtrteclipse [-WORKSPACE={workspace directory}] [testsuite_pathname [{testsuite_pathname}]][-BUILD_PROJECT={project_name | all}][-BINDIR={directory}][-TDPDIR={directory}][-REPORTDIR={directory}]

    • <workspace> is the path to the workspace that contains the test suite. For example "C:\temp\workspace".
    • <test suite_pathname> is the path and filename of the test suite in the workspace. You can run multiple test suites in the same workspace.
    • <bin directory> optionally indicates the location of eclipse.exe. By default, the product uses:

      "C:\Program Files\HCL\HCLOneTest\Embedded"

    • <tdp directory> optionally indicates the location of the target deployment port directory. By default, the product uses:

      "C:\Program Files\HCL\HCLOneTest\Embedded\targets"

    • <reportdir directory> indicates the location where all the .xml report files are copied.
    For example:
    • rtrteclipse -WORKSPACE={workspace} {testsuitePathFromWorkspace} [{testsuite}] [options]
    • rtrteclipse {testsuiteWithAbsolutePath} [{testsuite}] [options] #. In this case, the workspace and the directory where are located the test suites, are deducted from the first test suite path.
  3. When the test is finished, start HCL OneTest Embedded for Eclipse IDE to view the results or open the directory reports with a web browser.