| Version 3.4.7 |
| Events |
This section lists all kinds of nodes that trigger actions in the SUT. Besides true Java events these include pseudo events with special behavior.
| 'Mouse event' |
|
|
'Mouse events' simulate mouse movement and clicks as well as drag and drop operations. |
Contained in: All kinds of sequences.
Children: None
Execution:
The coordinates and other attributes of the event are sent to the
SUT together with the data about the target component. The
TestEventQueue determines the corresponding component in the
SUT, adjusts the coordinates and triggers the resulting event.
Attributes:
|
| ![]() |
||
|
| Figure 30.47: 'Mouse event' attributes | ||
The name of the SUT client process to which the event is sent.
Variable: Yes
Restrictions: Must not be empty.
The 'Id' of the 'Window', 'Component' or 'Item' node that is the target of the event.
The
button brings up a dialog in which you can select the component
interactively. You can also get to this dialog by pressing
[Shift-Return] or
[Alt-Return], when the focus is in the
text field. As an alternative you can copy the target node with
[Ctrl-C] or
»Edit«-»Copy«
and insert its Id into the text field by pressing
[Ctrl-V].
By using a special syntax you can target 'Items' directly or access components from another suite (see section 7.3 and section 17.1 for details).
Variable: Yes
Restrictions: Must not be empty.
This ComboBox lets you choose the type of the event.
MOUSE_MOVED, MOUSE_PRESSED, MOUSE_RELEASED,
MOUSE_CLICKED and MOUSE_DRAGGED are the standard event ids of
the Java class MouseEvent.
The abstract 'Mouse click' event is a compound of the events
MOUSE_MOVED, MOUSE_PRESSED, MOUSE_RELEASED and MOUSE_CLICKED.
During replay the pseudo event is simulated as four separate
events. This adds to the clarity of a test-suite and simplifies
editing.
The events MOUSE_DRAG_FROM, MOUSE_DRAG_OVER and
MOUSE_DROP_TO are used to simulate Drag&Drop in the SUT. See section 36.1 for details.
Variable: No
Restrictions: None
These are the coordinates of the MouseEvent. They are
relative to the upper left corner of the 'Window',
'Component' or 'Item' that is the target of
the event. They can be negative, e.g. to simulate a click on the
expansion toggle of a node in a JTree.
Most of the time the exact coordinates for a mouse don't really matter, any place within the target will do. In this case you should leave the 'X' and 'Y' values empty to tell QF-Test to aim at the center of the target. Where possible QF-Test will leave the values empty when recording, provided the option Record MouseEvents without coordinates where possible is active.
Variable: Yes
Restrictions: Valid number or empty
This value reflects the state of the mouse buttons and the modifier keys [Shift], [Control], [Alt] and [Meta] during a mouse or key event. States are combined by adding up their values.
|
|
|
||||||||||||||
|
| Table 30.16: Modifier values | ||||||||||||||
Variable: Yes
Restrictions: Valid number
This value lets a Java program distinguish between a single and a double (or even multiple) click.
Variable: Yes
Restrictions: Valid number
If this attribute is set, the event can trigger a PopupMenu. This is Java's somewhat peculiar way of supporting different conventions for triggering PopupMenus on different platforms.
Variable: Yes
Restrictions: None
If this attribute is set the event is replayed as a hard event, meaning it is triggered as a real system event that moves the mouse around and not just inserted as soft event into the event queue. Soft events are are typically better because they avoid impact of concurrent user mouse actions and are less likely to break due to interference from an overlapping window. Nevertheless there are certain special situations where hard events are helpful.
Variable: Yes
Restrictions: None
At the moment the 'Id' attribute has no meaning for this type of node.
Variable: No
Restrictions: Must not contain any of the characters '\', '#', '$', '@', '&', or '%' or start with an underscore ('_').
These attributes cause a delay before or after the execution of the node. If a value is empty, the Default delay from the global options is used.
Variable: Yes
Restrictions: Valid number >= 0
Here you can enter a comment that explains the purpose of this node. This is the preferred way of documenting the test-suite.
Note
For detailed documentation, especially for 'Test-set', 'Test-case' or 'Procedure' nodes,
this text area might not be the right place. There are many excellent editors that are
much better suited to this task. The option External editor command lets you
define an external editor in which comments can be edited conveniently by pressing
[Alt-Return] or by clicking the
button.
Variable: Yes
Restrictions: None
| 'Key event' |
|
|
'Key events' simulate keyboard input in the SUT. These are used mainly for control and function keys. Input of text is better represented as a 'Text input'.
The special keyboard event |
Contained in: All kinds of sequences.
Children: None
Execution:
The key codes of the event are sent to the SUT together with the
data about the target component. The TestEventQueue determines the
corresponding component in the SUT and triggers the resulting
event.
Attributes:
|
| ![]() |
||
|
| Figure 30.48: 'Key event' attributes | ||
The name of the SUT client process to which the event is sent.
Variable: Yes
Restrictions: Must not be empty.
The 'Id' of the 'Window', 'Component' or 'Item' node that is the target of the event.
The
button brings up a dialog in which you can select the component
interactively. You can also get to this dialog by pressing
[Shift-Return] or
[Alt-Return], when the focus is in the
text field. As an alternative you can copy the target node with
[Ctrl-C] or
»Edit«-»Copy«
and insert its Id into the text field by pressing
[Ctrl-V].
By using a special syntax you can target 'Items' directly or access components from another suite (see section 7.3 and section 17.1 for details).
Variable: Yes
Restrictions: Must not be empty.
This ComboBox lets you choose the type of the event.
KEY_PRESSED, KEY_TYPED and KEY_RELEASED are the standard
event ids of the Java class KeyEvent.
The 'Keystroke' pseudo event is a compound of the events
KEY_PRESSED, KEY_TYPED and KEY_RELEASED. During replay the
pseudo event is simulated as two or three separate events,
depending on whether it is a printable character key, or a
control or function key. In the latter case, no KEY_TYPED event
is generated.
Variable: No
Restrictions: None
This is a convenience method to set 'Key code',
'Key char' and 'Modifiers'
directly by pressing the corresponding key while this component
has the keyboard focus. For KEY_TYPED events
'Key char' is set to 0.
Unfortunately you can't select the [Tab] key this way since it is used for keyboard traversal. 'Key code' and 'Key char' for the [Tab] key are both 9.
Variable: No
Restrictions: None
This is a Java specific code for the key, the
keyCode member of the Java class
KeyEvent.
Variable: Yes
Restrictions: Valid number
This is the keyChar member of the Java class
KeyEvent. Its value is the character generated
created by the last key press, taking the state of the
[Shift] key into account. Control and
function keys always have a 'Key char' value of 65535.
Variable: Yes
Restrictions: Valid number
This value reflects the state of the mouse buttons and the modifier keys [Shift], [Control], [Alt] and [Meta] during a mouse or key event. States are combined by adding up their values.
|
|
|
||||||||||||||
|
| Table 30.17: Modifier values | ||||||||||||||
Variable: Yes
Restrictions: Valid number
At the moment the 'Id' attribute has no meaning for this type of node.
Variable: No
Restrictions: Must not contain any of the characters '\', '#', '$', '@', '&', or '%' or start with an underscore ('_').
These attributes cause a delay before or after the execution of the node. If a value is empty, the Default delay from the global options is used.
Variable: Yes
Restrictions: Valid number >= 0
Here you can enter a comment that explains the purpose of this node. This is the preferred way of documenting the test-suite.
Note
For detailed documentation, especially for 'Test-set', 'Test-case' or 'Procedure' nodes,
this text area might not be the right place. There are many excellent editors that are
much better suited to this task. The option External editor command lets you
define an external editor in which comments can be edited conveniently by pressing
[Alt-Return] or by clicking the
button.
Variable: Yes
Restrictions: None
| 'Text input' |
|
|
This is a pseudo event for simulating text input from the
keyboard. A single 'Text input' node replaces a whole sequence
of 'Key event' nodes. To achieve this, QF-Test takes
advantage of the fact that AWT and Swing text fields listen
only to |
Contained in: All kinds of sequences.
Children: None
Execution:
The text is sent to the SUT together with the data about the
target component. The TestEventQueue determines the corresponding
component in the SUT and triggers the resulting events.
Attributes:
|
| ![]() |
||
|
| Figure 30.49: 'Text input' attributes | ||
The name of the SUT client process to which the event is sent.
Variable: Yes
Restrictions: Must not be empty.
The 'Id' of the 'Window', 'Component' or 'Item' node that is the target of the event.
The
button brings up a dialog in which you can select the component
interactively. You can also get to this dialog by pressing
[Shift-Return] or
[Alt-Return], when the focus is in the
text field. As an alternative you can copy the target node with
[Ctrl-C] or
»Edit«-»Copy«
and insert its Id into the text field by pressing
[Ctrl-V].
By using a special syntax you can target 'Items' directly or access components from another suite (see section 7.3 and section 17.1 for details).
Variable: Yes
Restrictions: Must not be empty.
The text that is to be sent to the SUT.
Note When inserting text into a password field it may be desirable to avoid having the password show up as plain text in the test-suite or a run-log. To that end the password can be crypted by inserting the plain-text password, right-clicking and selecting »Crypt password« from the popup menu. Please be sure to specify a password salt before crypting via the option Salt for crypting passwords.
Variable: Yes
Restrictions: No line breaks are possible.
If this attribute is set, and the target component is a text field or text area, the contents of the target component are removed before the new text is inserted.
Variable: Yes
Restrictions: None
If the target component is a text field or a text area, the text can optionally be inserted by manipulating the component directly through its API. This is much faster, but if KeyListeners are registered on the component they will not be notified of the change. If this attribute is set, key events are simulated for every single character.
Variable: Yes
Restrictions: None
At the moment the 'Id' attribute has no meaning for this type of node.
Variable: No
Restrictions: Must not contain any of the characters '\', '#', '$', '@', '&', or '%' or start with an underscore ('_').
These attributes cause a delay before or after the execution of the node. If a value is empty, the Default delay from the global options is used.
Variable: Yes
Restrictions: Valid number >= 0
Here you can enter a comment that explains the purpose of this node. This is the preferred way of documenting the test-suite.
Note
For detailed documentation, especially for 'Test-set', 'Test-case' or 'Procedure' nodes,
this text area might not be the right place. There are many excellent editors that are
much better suited to this task. The option External editor command lets you
define an external editor in which comments can be edited conveniently by pressing
[Alt-Return] or by clicking the
button.
Variable: Yes
Restrictions: None
| 'Window event' |
|
|
WindowEvents are of limited use for a test-suite since most of
them are not generated as a direct consequence of some user
interaction.
The only
exception is the |
Contained in: All kinds of sequences.
Children: None
Execution:
The event is sent to the SUT together with the data about the
target window. The TestEventQueue determines the corresponding
window in the SUT and triggers the resulting event.
Attributes:
|
| ![]() |
||
|
| Figure 30.50: 'Window event' attributes | ||
The name of the SUT client process to which the event is sent.
Variable: Yes
Restrictions: Must not be empty.
The 'Id' of the 'Window', 'Component' or 'Item' node that is the target of the event.
The
button brings up a dialog in which you can select the component
interactively. You can also get to this dialog by pressing
[Shift-Return] or
[Alt-Return], when the focus is in the
text field. As an alternative you can copy the target node with
[Ctrl-C] or
»Edit«-»Copy«
and insert its Id into the text field by pressing
[Ctrl-V].
By using a special syntax you can target 'Items' directly or access components from another suite (see section 7.3 and section 17.1 for details).
Variable: Yes
Restrictions: Must not be empty.
This ComboBox lets you choose the type of the event.
Possible values are WINDOW_OPENED, WINDOW_CLOSING, WINDOW_CLOSED,
WINDOW_ACTIVATED, WINDOW_DEACTIVATED, WINDOW_ICONIFIED and
WINDOW_DEICONIFIED, the standard event ids of the Java class
WindowEvent.
Variable: No
Restrictions: None
At the moment the 'Id' attribute has no meaning for this type of node.
Variable: No
Restrictions: Must not contain any of the characters '\', '#', '$', '@', '&', or '%' or start with an underscore ('_').
These attributes cause a delay before or after the execution of the node. If a value is empty, the Default delay from the global options is used.
Variable: Yes
Restrictions: Valid number >= 0
Here you can enter a comment that explains the purpose of this node. This is the preferred way of documenting the test-suite.
Note
For detailed documentation, especially for 'Test-set', 'Test-case' or 'Procedure' nodes,
this text area might not be the right place. There are many excellent editors that are
much better suited to this task. The option External editor command lets you
define an external editor in which comments can be edited conveniently by pressing
[Alt-Return] or by clicking the
button.
Variable: Yes
Restrictions: None
| 'Component event' |
|
|
The name 'Component event' for this node may be misleading,
since QF-Test filters all of these events except for windows, but
since they represent the Java class |
Contained in: All kinds of sequences.
Children: None
Execution:
The event is sent to the SUT together with the data about the
target window. The TestEventQueue determines the corresponding
window in the SUT and triggers the resulting event.
Attributes:
|
| ![]() |
||
|
| Figure 30.51: 'Component event' attributes | ||
The name of the SUT client process to which the event is sent.
Variable: Yes
Restrictions: Must not be empty.
The 'Id' of the 'Window', 'Component' or 'Item' node that is the target of the event.
The
button brings up a dialog in which you can select the component
interactively. You can also get to this dialog by pressing
[Shift-Return] or
[Alt-Return], when the focus is in the
text field. As an alternative you can copy the target node with
[Ctrl-C] or
»Edit«-»Copy«
and insert its Id into the text field by pressing
[Ctrl-V].
By using a special syntax you can target 'Items' directly or access components from another suite (see section 7.3 and section 17.1 for details).
Variable: Yes
Restrictions: Must not be empty.
This ComboBox lets you choose the type of the event.
Possible values are COMPONENT_SIZED
and COMPONENT_MOVED, the standard event ids of the Java class
ComponentEvent.
Variable: No
Restrictions: None
For a COMPONENT_MOVED event set this to the new Y-coordinate of the
window, for a COMPONENT_SIZED event to its new height.
Variable: Yes
Restrictions: Valid number, height > 0
For a COMPONENT_MOVED event set this to the new X-coordinate of the
window, for a COMPONENT_SIZED event to its new width.
Variable: Yes
Restrictions: Valid number, width > 0
At the moment the 'Id' attribute has no meaning for this type of node.
Variable: No
Restrictions: Must not contain any of the characters '\', '#', '$', '@', '&', or '%' or start with an underscore ('_').
These attributes cause a delay before or after the execution of the node. If a value is empty, the Default delay from the global options is used.
Variable: Yes
Restrictions: Valid number >= 0
Here you can enter a comment that explains the purpose of this node. This is the preferred way of documenting the test-suite.
Note
For detailed documentation, especially for 'Test-set', 'Test-case' or 'Procedure' nodes,
this text area might not be the right place. There are many excellent editors that are
much better suited to this task. The option External editor command lets you
define an external editor in which comments can be edited conveniently by pressing
[Alt-Return] or by clicking the
button.
Variable: Yes
Restrictions: None
| 'Selection' |
|
|
A 'Selection' node represents an abstract event like selecting a menu item, choosing an entry in a combo box or selecting something from or closing a system dialog. Currently this event node is used only for SWT and web SUT clients, where some events cannot be triggered by "soft" mouse events, . The alternative of using "hard" events has some disadvantages as described for the 'Replay as "hard" event' attribute of a 'Mouse event'. The 'Detail' attribute determines the kind of operation to perform, or the value to select, depending on the target component. SWT The following combinations of widgets and 'Detail' values are currently supported for SWT:
Note Eclipse/RCP makes heavy use of dynamic Web The following combinations of DOM nodes and 'Detail' values are currently supported for web SUT clients:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contained in: All kinds of sequences.
Children: None
Execution: The event is sent to the SUT together with the data about the target component. The component is resolved and an action performed which depends on the type of component as listed in the table above.
Attributes:
|
| ![]() |
||
|
| Figure 30.52: 'Selection' attributes | ||
The name of the SUT client process to which the event is sent.
Variable: Yes
Restrictions: Must not be empty.
The 'Id' of the 'Window', 'Component' or 'Item' node that is the target of the event.
The
button brings up a dialog in which you can select the component
interactively. You can also get to this dialog by pressing
[Shift-Return] or
[Alt-Return], when the focus is in the
text field. As an alternative you can copy the target node with
[Ctrl-C] or
»Edit«-»Copy«
and insert its Id into the text field by pressing
[Ctrl-V].
By using a special syntax you can target 'Items' directly or access components from another suite (see section 7.3 and section 17.1 for details).
Variable: Yes
Restrictions: Must not be empty.
The 'Detail' attribute specifies the kind of operation to perform or the value to select, depending on the target component. The possible combinations are listed in detail above.
Variable: Yes
Restrictions: None
At the moment the 'Id' attribute has no meaning for this type of node.
Variable: No
Restrictions: Must not contain any of the characters '\', '#', '$', '@', '&', or '%' or start with an underscore ('_').
These attributes cause a delay before or after the execution of the node. If a value is empty, the Default delay from the global options is used.
Variable: Yes
Restrictions: Valid number >= 0
Here you can enter a comment that explains the purpose of this node. This is the preferred way of documenting the test-suite.
Note
For detailed documentation, especially for 'Test-set', 'Test-case' or 'Procedure' nodes,
this text area might not be the right place. There are many excellent editors that are
much better suited to this task. The option External editor command lets you
define an external editor in which comments can be edited conveniently by pressing
[Alt-Return] or by clicking the
button.
Variable: Yes
Restrictions: None
| 'File selection' |
|
|
A 'File selection' is a pseudo event that you only need in a special case.
If your SUT uses the standard AWT file selection dialog,
implemented by the class Therefore QF-Test just records the result of the file selection in the form of this node and stores that data in the FileDialog upon replay before closing it. For the SUT there is no difference to an actual selection by the user. |
Contained in: All kinds of sequences.
Children: None
Execution:
File and directory are stored in an open java.awt.FileDialog and the dialog
is closed.If no FileDialog is open, a ComponentNotFoundException is
thrown.
Attributes:
|
| ![]() |
||
|
| Figure 30.53: 'File selection' attributes | ||
The name of the SUT client process to which the event is sent.
Variable: Yes
Restrictions: Must not be empty.
The name of the file (without the directory part) that is to be selected.
Variable: Yes
Restrictions: Must not be empty
The directory of the file that is to be selected.
Variable: Yes
Restrictions: Must not be empty
The GUI engine in which to look for a file selection dialog. Only relevant for SUTs with more than one GUI engine as described in chapter 34.
Variable: Yes
Restrictions: See chapter 34
At the moment the 'Id' attribute has no meaning for this type of node.
Variable: No
Restrictions: Must not contain any of the characters '\', '#', '$', '@', '&', or '%' or start with an underscore ('_').
These attributes cause a delay before or after the execution of the node. If a value is empty, the Default delay from the global options is used.
Variable: Yes
Restrictions: Valid number >= 0
Here you can enter a comment that explains the purpose of this node. This is the preferred way of documenting the test-suite.
Note
For detailed documentation, especially for 'Test-set', 'Test-case' or 'Procedure' nodes,
this text area might not be the right place. There are many excellent editors that are
much better suited to this task. The option External editor command lets you
define an external editor in which comments can be edited conveniently by pressing
[Alt-Return] or by clicking the
button.
Variable: Yes
Restrictions: None
| Last update: 04/23/2012 Copyright © 1999-2012 Quality First Software GmbH |