Working with Test Scripts

prevnext

Compiling Test Scripts


When running a test script, TestManager checks the time stamp of the compiled script. If the compiled script is out of date, TestManager compiles the script before running it.

To compile a script, TestManager locates the compiler javac.exe on your computer's system path. If TestManager can't find a compiler, it generates an error.

For information about running scripts with TestManager, see the Rational TestManager User's Guide.

A Java script is compiled to a .class file. By default, the file is stored in the test script source folder.

The .class file is assigned the same root name as the .java file.

If a script contains inner classes (classes declared within classes), each class is compiled to its own file.


Entering Java Compiler Options

You can enter Java compiler options by doing the following from TestManager:

  1. Click Tools > Manage > Test Script Types.

  2. Select Java Script and click the Edit button.

    The Test Script Type Properties dialog appears.

  3. Click the Execution Adapter Type tab.

  4. Under the Options heading at the bottom, in the Options Name column, enter:

    _TMS_TSO_JAVA_COMPILATIONFLAGS
    
  5. In the corresponding Option Value column, type the option(s). Precede each option by a - and separate options by a space.

This method specifies command-line options, which take precedence. For example, option - classpath overrides the classpath environment variable.

prevnext


Rational Test Script Services for Java Rational Software Corporation
Copyright (c) 2003, Rational Software Corporation http://www.rational.com
support@rational.com
info@rational.com