Rational® Quality Manager script arguments

You can pass arguments from IBM® Rational® Quality Manager while running an HCL OneTest UI script.

You can pass the following types of arguments while running functional test scripts from Rational® Quality Manager:
  • Script arguments: These arguments are available to a script writer within the script as arguments to the testMain() method.
  • Execution arguments: These arguments govern playback. If HCL OneTest UI test scripts that run from Rational® Quality Manager have a dependency on a third-party library, you must consider the following points:
    • You must use the -projectpath or -classpath command line argument to specify a third-party library. For example: -projectpath C:\temp\myjar.jar. See Command line interface.
      Note: Command line arguments such as -enable, -inspector, or -appconfig that are not applicable for Rational® Quality Manager is not considered during playback.
    • You can pass java properties along with execution arguments. For example, -Dmyprop=value. You can also pass multiple java properties that are separated by space along with execution arguments. For example, -Dmyprop1=value1 -Dmyprop2=value2 -projectpath C:\tmp\myjar.jar.

  • dataset iteration: If there is a dataset associated with a script, you can pass the number of times the scripts must run by accessing records from the dataset.
Additionally, you can pass execution task details of Rational® Quality Manager to a functional test script so that information about the Rational® Quality Manager test cases is accessed during script execution.

To access execution task details within the testMain() method in a functional test script, you must provide the path to the XML file that describes the Rational® Quality Manager execution task.

In the functional test script, you must add String path = System.getProperty("rqm.task") to get the path of the XML file.

Refer to the XML Representation of an adapter Task section on the http://open-services.net/bin/view/Main/QmExecutionAdapter web page for information about the schema of the execution task that is represented in this file.

This file points to other resources for other Rational® Quality Manager assets such as test cases. You can find the schemas for the other resources on the same site. By using the data in this XML file, you can communicate with Rational® Quality Manager.

Note: The details Rational® Quality Manager that you pass using this method are specific and local to the script. If you want to specify details from the Rational® Quality Manager test script, test case, or test suite levels, you use execution variables. See Rational Quality Manager execution variables.