Version 8.0.2 |
'Windows', 'Components' and 'Items' are the foundation on which a test suite is built. They represent the windows and components of the SUT as well as the sub-items of complex components.
Many of the other node types need a window or component as a target, e.g. events or checks. To that end their 'QF-Test component ID' attribute must be set to the 'QF-Test ID' of an existing 'Window', 'Component' or 'Item' node.
All of the windows and components of a test suite are collected under the 'Windows and components' node, which is always located at the bottom of the suite.
In the chapters Components and the section How to achieve robust component recognition in the "Best Practices" chapter you will find more information about the usage of components.
This node is a surrogate for a window in the SUT. Events, checks and other nodes refer to it by its 'QF-Test ID'. |
Contained in:'Window group', 'Windows and components'.
Children:'Component group', 'Component'.
Execution: Cannot be executed.
Attributes:
Figure 41.88: 'Window' attributes |
This ID is the means by which other nodes refer to this window. Therefore it may appear in many places and you should take care to assign an ID with a meaning, i.e. one that is easy to remember and recognize. A QF-Test ID must be unique within the test suite.
Variable: No
Restrictions: Must not be empty, contain any of the characters '#', '$', '@', '&', or '%' or start with an underscore ('_').
The fully qualified name of the Java class of the window or one of its superclasses.
Variable: Yes
Restrictions: Must not be empty.
The name of the window that was set by the developers of the
SUT with the setName(String)
method. See
section 47.1 for why and how names should be
set on all "interesting" components.
Variable: Yes
Restrictions: None
If there is no 'Name' available for the window, QF-Test tries to recognize it by a characteristic feature. In the case of a Frame or a Dialog this is the window's title.
See section 47.1 for more information about component recognition.
4.0+ You can select »Escape text for regular expressions« from the context menu for escaping special characters of regular expressions of that text.
Variable: Yes
Restrictions: None
If this attribute is set, the 'Feature' is a regular expression (see section 48.3).
Variable: Yes
Restrictions: None
Besides the main 'Feature' a 'Component' can have additional features represented as name/value pairs. The kind of component determines which extra features are recorded. Each extra feature can have one of three states:
Additional columns allow for matching against a regular expression or to negate the expression, e.g. to define that the "class" attribute of a DOM node in a web page should not be "dummy". The absence of an extra feature can be enforced by adding one with an empty value. It's also allowed to use variables for those columns. You can open a textual editor via double clicking the cell and specify the respective variable then.
4.0+ You can select »Escape text for regular expressions« from the context menu for escaping special characters of regular expressions of the value.
QF-Test automatically assigns some extra features to recorded components.
| ||||||||||||||||||||||||||||||||||||||||||
Table 41.36: Extra features assigned by QF-Test |
Variable: Yes
Restrictions: Names must not be empty
In case of a Dialog this attribute determines whether the dialog is modal.
Variable: Yes
Restrictions: None
The X/Y coordinate, width and height of the window form the basis for the recognition of the window. However, they play a minor roll as long as either a 'Name' was provided or a 'Feature' is available.
For windows whose location and size vary widely you should clear these attributes.
Note If no values are specified, the recognition algorithm starts with a perfect geometry match for all candidates. To prevent false positive hits you can disable geometry matching by setting the values to a single '-' character.
Variable: Yes
Restrictions: Width and height must not be negative.
The GUI engine to which the 'Window' and all its 'Component' children
belong. QF-Test records awt
for AWT/Swing and swt
for SWT.
Only really relevant for SUTs with more than one GUI engine as described in chapter 44.
Variable: Yes
Restrictions: See chapter 44
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.
You can trigger special behaviors of some nodes using doctags, please see Doctags.
If you enter text in the comment field of a 'Component' node, the node will be considered as 'used' when you want to mark or delete unused components.
Variable: Yes
Restrictions: None
Web A 'Web page' is a variant of a 'Window' node specifically used for testing web applications. It represents the top-level document in a Browser. Nested documents in <FRAME> nodes are represented as 'Components'. In contrast to a 'Window' a 'Web page' has no 'Class name', 'Modal', geometry or 'GUI engine' attributes as these are either implicitly defined or redundant. |
Contained in:'Window group', 'Windows and components'.
Children:'Component group', 'Component'.
Execution: Cannot be executed.
Attributes:
Figure 41.89: 'Web page' attributes |
This ID is the means by which other nodes refer to this page. Therefore it may appear in many places and you should take care to assign an ID with a meaning, i.e. one that is easy to remember and recognize. A QF-Test ID must be unique within the test suite.
Variable: No
Restrictions: Must not be empty, contain any of the characters '#', '$', '@', '&', or '%' or start with an underscore ('_').
This attribute can be ignored unless you need to test a web application with multiple open browser windows holding similar documents. In that case the 'Name of the browser window' attribute can be used to identify the browser window. The name of a browser window can be defined via the 'Name of the browser window' attribute of a 'Open browser window' node. You find a brief description how to handle multiple browser windows in FAQ 25.
Variable: Yes
Restrictions: None
A web page has no name unless one is implemented via a NameResolver. See subsection 53.1.7 about the extension API for NameResolvers.
Variable: Yes
Restrictions: None
The main 'Feature' of a web page is its URL with the parameters removed. If the option Limit URL feature of 'Web page' node to host or file is set, the URL is further reduced to the host or file name.
See section 47.1 for more information about component recognition.
4.0+ You can select »Escape text for regular expressions« from the context menu for escaping special characters of regular expressions of that text.
Variable: Yes
Restrictions: None
If this attribute is set, the 'Feature' is a regular expression (see section 48.3).
Variable: Yes
Restrictions: None
Besides the main 'Feature' a 'Component' can have additional features represented as name/value pairs. The kind of component determines which extra features are recorded. Each extra feature can have one of three states:
Additional columns allow for matching against a regular expression or to negate the expression, e.g. to define that the "class" attribute of a DOM node in a web page should not be "dummy". The absence of an extra feature can be enforced by adding one with an empty value. It's also allowed to use variables for those columns. You can open a textual editor via double clicking the cell and specify the respective variable then.
4.0+ You can select »Escape text for regular expressions« from the context menu for escaping special characters of regular expressions of the value.
QF-Test automatically assigns some extra features to recorded components.
| ||||||||||||||||||||||||||||||||||||||||||
Table 41.37: Extra features assigned by QF-Test |
Variable: Yes
Restrictions: Names must not be empty
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.
You can trigger special behaviors of some nodes using doctags, please see Doctags.
If you enter text in the comment field of a 'Component' node, the node will be considered as 'used' when you want to mark or delete unused components.
Variable: Yes
Restrictions: None
'Component' nodes represent the components of the SUT. Other nodes refer to them by their 'QF-Test ID', similar to the way 'Windows' are referenced. The 'Window' node that is the direct or indirect parent of the component must be the equivalent of the component's window parent in the SUT. |
Contained in:'Component group', 'Window'.
Children:'Item'.
Execution: Cannot be executed.
Attributes:
Figure 41.90: 'Component' attributes |
This ID is the means by which other nodes refer to this component. Therefore it may appear in many places and you should take care to assign an ID with a meaning, i.e. one that is easy to remember and recognize. A QF-Test ID must be unique within the test suite.
Variable: No
Restrictions: Must not be empty, contain any of the characters '#', '$', '@', '&', or '%' or start with an underscore ('_').
For SWT and Swing application this is the fully qualified name of the Java class of the component or one of its super-classes whereas for web applications there is a pseudo class hierarchy described in subsection 5.4.1.
The actual class recorded by QF-Test depends on the setting of the option Record system class only and on potentially registered
ClassNameResolvers
(see subsection 53.1.9). Upon
replay, class matching is based on the actual or pseudo class hierarchy, so you can
manually change this attribute to any of the element's base classes.
Variable: Yes
Restrictions: Must not be empty.
The name of the component that was set by the developers of the
SUT with the setName(String)
method. See
section 47.1 for why and how names should be
set on all "interesting" components.
Variable: Yes
Restrictions: None
If there is no 'Name' available for the component, QF-Test tries to recognize it by a characteristic feature.
See section 47.1 for more information about component recognition.
4.0+ You can select »Escape text for regular expressions« from the context menu for escaping special characters of regular expressions of that text.
Variable: Yes
Restrictions: None
If this attribute is set, the 'Feature' is a regular expression (see section 48.3).
Variable: Yes
Restrictions: None
Besides the main 'Feature' a 'Component' can have additional features represented as name/value pairs. The kind of component determines which extra features are recorded. Each extra feature can have one of three states:
Additional columns allow for matching against a regular expression or to negate the expression, e.g. to define that the "class" attribute of a DOM node in a web page should not be "dummy". The absence of an extra feature can be enforced by adding one with an empty value. It's also allowed to use variables for those columns. You can open a textual editor via double clicking the cell and specify the respective variable then.
4.0+ You can select »Escape text for regular expressions« from the context menu for escaping special characters of regular expressions of the value.
QF-Test automatically assigns some extra features to recorded components.
| ||||||||||||||||||||||||||||||||||||||||||
Table 41.38: Extra features assigned by QF-Test |
Variable: Yes
Restrictions: Names must not be empty
These two fields hold additional structural information needed for component recognition during a test run. The 'Class count' is the number of components within the same parent container and with the same class (or a class derived thereof). The 'Class index' is the index that this component has in the list of these components with matching class. As usual the first component has index 0.
When counting the components of matching class, invisible components are considered as well. This is more robust but means that the values may be higher than expected.
Note It is possible to specify just the 'Class index' or the 'Class count' attribute.
Variable: Yes
Restrictions: None
The X/Y coordinate, width and height of the component form the basis for the recognition of the component. However, they play a minor roll as long as either a 'Name' was provided or a 'Feature' or structural information is available.
For components whose location or size typically vary widely at runtime, these values are not recorded.
Note If no values are specified, the recognition algorithm starts with a perfect geometry match for all candidates. To prevent false positive hits you can disable geometry matching by setting the values to a single '-' character.
Variable: Yes
Restrictions: Width and height must not be negative.
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.
You can trigger special behaviors of some nodes using doctags, please see Doctags.
If you enter text in the comment field of a 'Component' node, the node will be considered as 'used' when you want to mark or delete unused components.
Variable: Yes
Restrictions: None
For complex Swing components like
The
There are two representations for the nodes of a Currently sub-items are supported for the following Swing components:
|
Contained in:'Component'.
Children: None.
Execution: Cannot be executed.
Attributes:
Figure 41.91: 'Item' attributes |
This ID is the means by which other nodes refer to this sub-item. Therefore it may appear in many places and you should take care to assign an ID with a meaning, i.e. one that is easy to remember and recognize. A QF-Test ID must be unique within the test suite.
Variable: No
Restrictions: Must not be empty, contain any of the characters '#', '$', '@', '&', or '%' or start with an underscore ('_').
Designates the sub-item. Depending on whether 'As string', 'As number' or 'As regexp' is selected, the sub-item is determined by its index or by a string or regexp match.
It is OK to have an empty index, e.g. to designate a table column with an empty heading.
Variable: Yes
Restrictions: Must be a valid number or regexp if required.
For the JTable
class two kinds of sub-items are
supported. If only the 'Primary index' is given, a
whole column is referenced. An additional 'Secondary index'
designates a cell in this column.
To define a secondary index its checkbox must be selected first. This is necessary to tell an empty index from a non-existent one. An empty secondary index designates a table cell with empty content.
Variable: Yes
Restrictions: Must be a valid number or regexp if required.
The 'Primary index' or 'Secondary index' is interpreted as a plain string. The sub-item is determined by matching its representation against that string.
Variable: No
Restrictions: None
The 'Primary index' or 'Secondary index' is interpreted as a number. The sub-item is determined by its index.
Variable: No
Restrictions: None
The 'Primary index' or 'Secondary index' is interpreted as a regexp (see section 48.3). The sub-item is determined by matching its representation against that regexp.
Variable: No
Restrictions: None
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.
You can trigger special behaviors of some nodes using doctags, please see Doctags.
If you enter text in the comment field of a 'Component' node, the node will be considered as 'used' when you want to mark or delete unused components.
Variable: Yes
Restrictions: None
A 'Window group's' only purpose is to provide structure to the 'Windows' of a test suite. If you have to manage a large number of 'Windows' you can even nest 'Window groups'. |
Contained in:'Windows and components', 'Window group'.
Children:'Window group', 'Window'.
Execution: Cannot be executed.
Attributes:
Figure 41.92: 'Window group' attributes |
You can choose an arbitrary name. It is displayed in the tree view of the suite.
Variable: No
Restrictions: None
At the moment the 'QF-Test 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 ('_').
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.
You can trigger special behaviors of some nodes using doctags, please see Doctags.
If you enter text in the comment field of a 'Component' node, the node will be considered as 'used' when you want to mark or delete unused components.
Variable: Yes
Restrictions: None
A 'Component group's' only purpose is to provide structure to the 'Components' of a 'Window'. If you have to manage a large number of 'Components' inside a 'Window' you can even nest 'Component groups'. |
Contained in:'Window', 'Component group'.
Children:'Component group', 'Component'.
Execution: Cannot be executed.
Attributes:
Figure 41.93: 'Component group' attributes |
You can choose an arbitrary name. It is displayed in the tree view of the suite.
Variable: No
Restrictions: None
At the moment the 'QF-Test 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 ('_').
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.
You can trigger special behaviors of some nodes using doctags, please see Doctags.
If you enter text in the comment field of a 'Component' node, the node will be considered as 'used' when you want to mark or delete unused components.
Variable: Yes
Restrictions: None
The 'Windows and components' node is always located at the end of the suite. It is the place where all of the 'Windows', 'Components' and 'Items' of the test suite are collected. |
Contained in: Root node
Children:'Window group', 'Window'.
Execution: Cannot be executed.
Attributes:
Figure 41.94: 'Windows and components' attributes |
At the moment the 'QF-Test 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 ('_').
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.
You can trigger special behaviors of some nodes using doctags, please see Doctags.
If you enter text in the comment field of a 'Component' node, the node will be considered as 'used' when you want to mark or delete unused components.
Variable: Yes
Restrictions: None
Last update: 12/4/2024 Copyright © 1999-2024 Quality First Software GmbH |