Settings - JavaEngine

The following settings can be found under Settings->Special Engines->JavaEngine.

  • CheckTextFieldAfterSetValue

    If Enabled, the engine verifies whether the value is actually in the text field when steering a Swing text field (a text is entered).

    If Disabled, the engine does not verify whether the value is in the text field when steering a Swing text field (a text is entered).

  • Component search finds only isShowing

    If this setting is true, only controls with the property isShowing=true are considered when identifying or searching controls.

  • Component search ignores class names

    By default, the technical ID and the class name are considered when controls are identified or searched. If this entry is set to true, the class name is not considered, only the technical ID.

  • componentProperties

    For Swing applications, this entry offers the possibility to specify all control properties which can be used for identification. The specified properties are separated by semicolons. These properties are displayed in the Control Properties tab in Tosca Wizard.

  • currentSession

    Specifies which Java application must be steered in multisession mode (see table "JAVA IMultisession mode").

  • matchType

    Specifies which match type is used by the Java Engine to identify strings (e.g. window caption). The following values are possible: FULL, INITIAL, PARTIAL

    FULL: The complete string must be specified

    INITIAL: The beginning of the string must match. (Example: Test for Test application)

    PARTIAL: Any part of the string can be specified. (Example: app for Test application)

This setting affects the Window Caption and the tree control (JavaTreeControl).

  • ScanParentProperty

    This setting determines whether the Parent name is taken into account when scanning applets. This setting is set to true by default.

  • Show Cursor Movements

    Shows the cursor and the test is run in the foreground. Select No if the test should run in the background.

  • Use regex for ComponentSearch

    This setting specifies whether regular expressions can be used in the TechnicalID.

  • x86Runtime

    This setting specifies the path to the directory of the 32 bit Java runtime used by JNIServer.exe. This path is used for steering 64 bit Java applications. The setting is specified by Tosca Enabler (see "Enabling the Java Runtime Environment with Tosca Enabler"). If the 32 bit runtime changes, the necessary adaptations can be made with this setting. Re-enabling with Tosca Enabler is not required. If the value of this setting is empty, 64 bit settings cannot be automated.

SWING-, SWT-, AWT steerings

The standard settings for steering Swing, SWT and AWT controls are defined here.

If the value for the control RadioButton is set to Mouse, the button is steered by a mouse click.

Steering

Steering

Description

toggle

Used for SWING buttons (chapter "JAVA I JavaPushButton").

nocheckafterinput

Used for SWING EditBoxes. After an input it is not checked whether the value has been written correctly to the EditBox.

index

Instead of a business-based input, specific elements of a SWING combobox can be selected directly based on their index.

Example: Instead of female, 1 is entered in a Combobox for selecting the gender. Via the steering Steering=index the entry Index=1 is selected.

mouse

Mouse commands are simulated to make the input.

direct

Inputs are made directly via Java API method calls.

invokelater

Similar to direct, but the action is started in a separate thread. This may be required to enable the steering of modal windows.

keypress

Keyboard inputs are simulated.

byClickOnPlus

Used for SWT tree controls. Tree items are expanded by clicking on the plus sign.

CustomControls

  • CustomControl paths

    Collection Entries, which have the path to a directory that contains a .jar file as a value, can be added here. In this .jar file, the corresponding CustomControl classes are specified. If CustomControl XML files (see chapter "JAVA I Extension of the existing Engine") refer to .jar files without a file path, the specified files are searched in the specified directories. The name of the Collection Entries can be arbitrarily chosen.

    If the path to a .jar file changes, it can be globally adapted via the setting CustomControl paths without having to modify the individual CustomControl XML files.

  • CustomControl XMLs

    CustomControl XML files can be added as a Collection Entry. The name of the Collection Entries must be based on the following schema:

    • XML1

    • XML2

    • XML3

    • etc.

    Example

    Name: XML1

    Value: C:\Temp\CustomRadioButton.xml

    In order for CustomControl XML files to be considered during the execution, the setting useCustomControls must be set to True.

    For each specified CustomControl, an attribute Path can be defined, which points to the .jar file with the corresponding CustomControl class (see chapter "Configuration file").

  • useCustomControls

    This setting allows the use of CustomControls to be activated or deactivated.

Example - useCustomControls

It is necessary to create an override before a Collection Entry can be added (see "Override").

Logging

  • Log-Directory

    This setting specifies where the following Tosca Java Engine log files are saved:

    • StartupLogger.txt

    • ClientLogger.txt

    • ServerLogger.txt

    Under the path specified here, the directory with the corresponding user name is created which contains the stored log files. If this path is modified, it must also be adapted in the <JRE_HOME>\lib\security\java.policy file.

    The default entry in the java.policy file looks as follows:

    Windows 7 (64-Bit):

    permission java.io.FilePermission "C:\\ProgramData\\TRICENTIS\\Tosca Testsuite\\7.0.0\\-", "read,write";

    Windows XP:

    permission java.io.FilePermission "C:\\Documents and Settings\\All Users\\Application Data\\TRICENTIS\\Tosca Testsuite\\7.0.0\\-", "read,write";

  • Logger Type

    This entry specifies the settings for the logging. The following settings are available:

    • no logging: deactivates the logging for the Java Engine

    • txt: creates the log files StartupLogger.txt, ClientLogger.txt and ServerLogger.txt

    • log4j: creates the HTML log files StartupLogger.html, ClientLogger.html and ServerLogger.html

Recovery

These settings are required for recovery processes. In this case the test object is restarted.

  • AUT Directory

    Directory and file of the test object to be restarted.

  • AUT FileName

    File name of the test object to be restarted.

RMI

  • RmiPort

    The port under which the RMI server can be accessed.

  • RmiRemoteObjectStartPort

    This setting is relevant for the multi-client mode. It defines the port of the first remote object that is specified in the rmiregistry. The port for each additional remote object is increased by 1 accordingly.

    Default value: 1100

  • RmiServer

    The address of the server where RMIREGISTRY was started. This is localhost by default if the application was tested locally on one computer.

SWT specific

  • SWT Datamap IDs

    For SWT controls, a unique ID can be specified via the setData (string key, object value) method. This allows SWT controls to be identified, which, unlike Swing controls, cannot always be uniquely identified via the property Name.

    The names of the keys can be specified in this setting, separated by commas. Tosca Wizard verifies these keys and displays the results as properties in the control properties.

Synchronization

  • ControlRetry

    Determines how often the engine attempts to steer a control.

  • waitBetweenKeypress

    This setting specifies the time between the key press and the key release when a key press is simulated using the Tosca Java Engine. To apply this setting, a value greater than 0 must be specified.

  • waitBetweenRetries

    This setting specifies the wait time between two steering attempts when, for example, a control, cursor or a window is not found.

  • waitForCursorShape

    Setting which determines whether the engine waits for the correct cursor shape (arrow).

    If Enabled, the window of the test object is steered and focused on. Afterwards, the mouse is positioned at the center of the window. The Tosca Java Engine waits until the mouse cursor no longer has the shape of an hour glass.

    We recommend deactivating this setting for SWT applications in order to avoid slowing down the steering.

  • waitForCursorTimeout

    If the setting waitForCursorShape is activated, the maximum wait time for the cursor shape can be specified. A query can repeatedly be made within this time span. The time that is waited between the queries can be specified under waitBetweenRetries.

  • WaitServerShutDown

    Determines how long (in milliseconds) the engine waits after the Java Engine server is shut down (e.g. in case of recovery).

  • waitSynchronisation

    This setting allows wait times (in milliseconds) to be defined between the actions.

CustomWait

If an application includes a specific control indicating the status of the application (e.g. ready or not ready), this control can be defined in the settings as CustomWait Control. The Tosca Java Engine then waits before each connect to control until the defined control status is reached. The following settings can be applied:

  • customWaitContext

    The context of the window with the wait control. If not specified, the currently active window is searched for the wait control.

    Example: Caption=Window

  • customWaitDesc

    The technical name of the control. This value can be found in the control of the corresponding ObjectMap under the attribute Desc.

  • customWaitEnabled

    This setting activates (true) and deactivates (false) the CustomWait function.

  • customWaitPropertyName

    This value determines which property should be read.

  • customWaitPropertyValueGo

    The value defined here indicates that the execution should be continued.

  • customWaitTimeout

    If the property does not receive the desired value within the specified time (in milliseconds), a timeout occurs and the test execution is aborted.

  • customWaitTypeInfo

    Arbitrary name of the custom control (e.g. WAITCONTROL).

Progressbar

  • progressBarName

    This entry specifies the property Name of the progress bar to wait for. If no value is specified, the Tosca Java Engine waits for all progress bars currently in the window (maximum 20 progress bars).

  • waitForProgressBar

    The Tosca Java Engine enables to wait for progress bars. The engine waits until the progress bar reaches its maximum value. It is possible to wait for one specifically defined progress bar or all progress bars of a window. This setting is only relevant to Swing controls and to the following progress bar type: javax.swing.JProgressbar.

  • waitForProgressBarTimeOut

    Here you can specify the maximum time to wait for a progress bar.