There are two options to start your Java AUT for testing:
This option means that you create an AUT configuration in your Project, and the AUT is started from the ITE (Section 22.214.171.124, “Configuring a Java AUT to be started from the ITE”).
This option lets you start an AUT without creating a configuration. Certain start parameters are required for the AUT so that it can be located (Section 126.96.36.199, “Starting Java AUTs with the autrun command”).
The AUT configuration dialog for Java has three different levels of detail: basic, advanced and expert.
See the sections below for information on the different levels.
You can use the basic setting (Figure 3.12, “AUTconfiguration window: basic”) to configure your AUT if it can be started by an executable file (e.g. .bat, .exe, .cmd, .sh etc.) and if it is written in Java 1.5 or above, and you are using a Java Standard Edition JRE.
|If you are testing RCP or GEF AUTs, there are certain specific steps you need to take to configure them. See the sections on RCP testing (Section 4.3, “Testing RCP AUTs”), GEF testing (Section 4.4, “Testing GEF AUTs”) for details.|
Enter the basic configuration details as described earlier (Section 3.8.2, “Basic information required for every AUT configuration”).
Enter the executable file name in the Executable File Name field. This path can be relative if you define a working directory (Section 188.8.131.52, “Advanced AUT configuration”).
For information on the advanced properties for the AUT configuration, see the next section (Section 184.108.40.206, “Advanced AUT configuration”).
You can use the advanced dialog (Figure 3.13, “AUTconfiguration window: advanced”) if your AUT is a Java JAR which can be started with a double click, or if your application can be started using the class name and the classpaths to your AUT. The advanced configuration dialog also lets you create a working directory for your AUT, and add command-line arguments needed to start the AUT. You can select a JRE executable and, for SWT/RCP AUTs, a keyboard layout.
Enter the JAR path (directory and file name) into the Executable JAR File Name field.
This path can be relative (if you define a working directory (Section 3.8.3, “Using a working directory in an AUT configuration”)), or absolute. This JAR file must contain a manifest file which contains the main class and the classpath.
If your AUT must be started with the class name, add the main class name and the classpaths into their relative fields. The paths can be relative (if you have defined a working directory), or absolute.
|Add all the necessary files and directories to start the AUT.|
Enter any necessary command-line arguments for the AUT in the AUT Arguments field.
Browse to a JRE executable or add a new one by clicking ”New”. The Java version used must be 1.5 or later.
Java is installed with the ITE. You can find the Java file in:--> --> . Use java.exe if you want to use a console, use javaw.exe if you do not want a console.
For SWT and RCP AUTs, select which keyboard layout is used on the machine on which the AUT will run.
|The keyboard layout is not the actual keyboard attached to the computer, but is based on the regional language settings for the operating system.|
English (US) and German (DE) keyboard layouts are supported out-of-the box. If you want to use a different keyboard layout, see the Developer Manual for information on creating keyboard layouts.
For information on the expert properties for the AUT configuration, see the next Section 220.127.116.11, “Expert AUT configuration”.
You can use the expert dialog (Figure 3.14, “AUTconfiguration window: expert”) to configure more detailed information about how the AUT should be started.
Add any additional desired JRE Arguments.
Enter any required System Environment Variables, in the format ”<VARNAME>=<value>”, i.e. ”PATH=C:\”. Separate each variable with a new line by pressing »ENTER«.
|Please be advised that ''embedding'' the contents of one variable into another is not supported at this time. That is, if you have a variable named FOO whose value is ”abc”, and set the value of a second variable BAR to ”%FOO%def”, the second variable will not contain ”abcdef”, but rather the exact text ”%FOO%def”, without evaluating it.|
Select an activation method for your AUT. More information on AUT activation is available in the previous Section 18.104.22.168, “AUT activation”.
If you want to perform monitoring (code coverage (Section 3.28, “Working with code coverage with Java tests”) , Chronon recording (Section 3.36, “Using Chronon”)), then select this from the combo box.
The autrun command can be used as an alternative to starting your AUT from the ITE. (i.e. with an AUT configuration (Section 3.8.1, “Configuring AUTs to be started from the ITE”)). It can only be used if your AUT is written in Java 1.5 or above, and you are using a Java Standard Edition JRE.
|The autrun command cannot be used for HTML, iOS or pure SWT AUTs.|
The command allows you to start your AUT independently, on a machine where the AUT Agent is running. The ITE, when connected to this AUT Agent will then recognize the running AUT as a testable application.
To use the autrun command:
Ensure that the AUT Agent is installed on the machine where you will be starting the AUT.
Navigate to the server directory in the installation via the command line.
Start your AUT via the command line by entering autrun.exe under Windows or autrun under Linux then the following parameters:
Gives parameter help
Enter the working directory for the AUT
Enter the hostname for the AUT Agent
-p <port number>
Enter the port number for the AUT Agent
|-swing||If the AUT is a Swing AUT|
|-rcp||If the AUT is an RCP AUT|
|-swt||If the AUT is an SWT AUT|
|-javafx||If the AUT is a JavaFX AUT|
Enter the keyboard layout for SWT/RCP AUTs
Enter the ID to give to this AUT
Enter the executable file for the AUT
This must be the last parameter in the command line
For RCP AUTs, enter whether
to generate technical names. (Section 3.7, “Defining applications under test (AUTs)”)
|If your AUT is an RCP AUT, use -data'<WORKSPACE>' after the executable file to specify the workspace the AUT should use.|
Once you have started an AUT using the autrun command, you can automatically generate an AUT definition (Section 3.7, “Defining applications under test (AUTs)”) for this AUT:
In the Running AUTs View, select the AUT you want to define (it will be marked as an unknown AUT ID).
from the context menu.
The AUT definition window will appear. Complete the dialog (Section 3.7, “Defining applications under test (AUTs)”) and click ”OK”.