| Version 3.4.4 |
| Miscellaneous |
This section lists the remaining nodes that don't fit in well with any of the other sections.
| 'Set variable' |
|
|
This node lets you set the value of a global variable. If the test is run interactively from QF-Test and not in batch mode (see section 1.5) you can optionally set the value interactively. |
Contained in: All kinds of sequences.
Children: None
Execution: If the test is run interactively and the 'Interactive' attribute is set, a dialog is shown in which the value for the variable can be entered. If the 'Timeout' is exceeded or the value is confirmed with the OK button, the variable is bound accordingly in the global variables. If the dialog is canceled, the test run is stopped. In the non-interactive case the variable is bound directly to the 'Default value'.
Attributes:
|
| ![]() |
||
|
| Figure 30.63: 'Set variable' attributes | ||
The name of the global variable to which the value is assigned (see chapter 8).
Variable: Yes
Restrictions: Must not be empty.
This flag determines whether to create a local or global variable binding. If unset, the variable is bound in the global variables. If set, the topmost current binding for the variable is replaced with the new value, provided this binding is within the context of the currently executing 'Procedure', 'Dependency' or 'Test-case' node. If no such binding exists, a new binding is created in the currently executing 'Procedure', 'Dependency' or 'Test-case' node or, if there is no such node, in the global bindings. See chapter 8 for a detailed explanation of variable binding and lookup.
Variable: No
Restrictions: None
The default value for the variable if the test is run non-interactively, the 'Interactive' attribute is not set or the 'Timeout' is exceeded.
Variable: Yes
Restrictions: None
Whether a dialog should be shown in which the value for the global variable can be entered. Ignored if the test is run non-interactively.
Variable: Yes
Restrictions: None
A short description to display in the dialog. If you leave this
value empty, the description Value for
<'Variable name'> will be used.
Variable: Yes
Restrictions: None
An optional timeout value for the dialog. If the dialog is shown and the value is left unchanged for the specified period of time, the dialog is closed automatically and the default value is used. This avoids blocking a test that is started interactively from QF-Test and then left to run unattended.
Variable: Yes
Restrictions: Empty or > 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: No
Restrictions: None
| 'Wait for component to appear' |
|
|
This node is very important for the timing of a test run. The
reaction time of the SUT varies depending on system and memory
load, so it may take a while until, say, a complex dialog is
opened. This node will delay further execution of the test until
the desired component or sub-item is available. If the time limit
is exceeded without success, a This node is intended only for relatively long delays. Short delays are handled automatically by the Timeout options. By setting the 'Wait for absence' attribute this node can also be used to ensure the absence of a component. |
Contained in: All kinds of sequences.
Children: None
Execution:
The data of the target component are sent to the SUT. The
TestEventQueue waits until either the corresponding component
becomes available or the time limit is exceeded.
Attributes:
|
| ![]() |
||
|
| Figure 30.64: 'Wait for component to appear' attributes | ||
The name of the Java process in which to wait.
Variable: Yes
Restrictions: Must not be empty.
The 'Id' of the 'Window', 'Component' or 'Item' to wait for.
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.
Time limit in milliseconds.
Variable: Yes
Restrictions: >= 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 ('_').
If this attribute is set, QF-Test waits for the absence of a
component. This is useful e.g. to ensure that a dialog has
closed or was never opened in the first place. If the component
does exist, a ComponentFoundException is thrown.
It is possible to check for the absence of a sub-item. In this
case, the complex component that holds the item must be present,
otherwise a ComponentNotFoundException is thrown.
Variable: Yes
Restrictions: None
This optional attribute determines the name for the result variable of the action. If set, the respective variable will be set to 'true' for a successful check or wait and to 'false' in case of failure.
Note If this attribute is set, the attribute 'Error level of message' is ignored and no error is reported. The attribute 'Throw exception on failure' always remains effective, so it is possible to set a result variable and still throw an exception.
Variable: Yes
Restrictions: None
This flag determines whether to create a local or global variable binding. If unset, the variable is bound in the global variables. If set, the topmost current binding for the variable is replaced with the new value, provided this binding is within the context of the currently executing 'Procedure', 'Dependency' or 'Test-case' node. If no such binding exists, a new binding is created in the currently executing 'Procedure', 'Dependency' or 'Test-case' node or, if there is no such node, in the global bindings. See chapter 8 for a detailed explanation of variable binding and lookup.
Variable: No
Restrictions: None
This attribute determines the error level of the message that is logged in case of failure. Possible choices are message, warning and error.
Note If the attribute 'Throw exception on failure' is set, this attribute is irrelevant and if 'Variable for result' is set this attribute is ignored.
Variable: No
Restrictions: None
Throw an exception in case of failure.
For 'Check...' nodes a CheckFailedException is thrown,
for 'Wait for...' nodes the respective specific exception.
Variable: No
Restrictions: None
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: No
Restrictions: None
| 'Wait for document to load' |
|
|
Web This node is a variant of the 'Wait for component to appear' node specifically for web pages. It not only checks the existence of a given document. If the target document was already known to exist the last time an event was replayed, this node waits for the document to get reloaded. When working with web pages it is often the case that the same or very similar documents are loaded many times. Without this node's functionality QF-Test could not discern the case where the old document is still around from the one where the document is already reloaded. In the former case, replaying an event could cause it to have no effect at all because at the same time reloading of the document begins.
The 'Name of the browser window' attribute can be used to limit the search to a given browser
window or to define a name for a new window. If 'Stop loading if timeout exceeded' is set, QF-Test will
abort loading the document if it doesn't finish in time. You can also use the
'Variable for result' attribute to store the result in a variable and the 'Throw exception on failure'
attribute to suppress the |
Contained in: All kinds of sequences.
Children: None
Execution:
The data of the target document are sent to the SUT. The
TestEventQueue waits until corresponding document gets loaded
or the time limit is exceeded in which case a DocumentNotLoadedException is thrown.
Attributes:
|
| ![]() |
||
|
| Figure 30.65: 'Wait for document to load' attributes | ||
The name of the SUT client process from which to query the data.
Variable: Yes
Restrictions: Must not be empty.
The 'Id' of the 'Window', 'Component' or 'Item' node that is to be queried.
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 attribute has a dual use. If set to an existing name for a browser window, QF-Test waits for the document to load in that window. If the name is set but no browser window by that name exists, the search is limited to documents in new or not-yet-named windows. If the wait succeeds and a new document is loaded, the window name is assigned to the document's browser window. This is the only way to define a name for a popup window. Explicitly launched browsers can have their name set via the 'Name of the browser window' attribute of a 'Start browser' node.
Variable: Yes
Restrictions: None
Time limit in milliseconds.
Variable: Yes
Restrictions: >= 0
If this attribute is set and the timeout is exceeded without a matching document finishing to load, QF-Test will cause loading to stop, either in all browsers or, if 'Name of the browser window' is set, the browser window specified therein. Result and exception handling are not affected by this attribute. If the timeout is exceeded the operation is considered a failure regardless of whether loading is stopped or not.
Variable: Yes
Restrictions: None
This optional attribute determines the name for the result variable of the action. If set, the respective variable will be set to 'true' for a successful check or wait and to 'false' in case of failure.
Note If this attribute is set, the attribute 'Error level of message' is ignored and no error is reported. The attribute 'Throw exception on failure' always remains effective, so it is possible to set a result variable and still throw an exception.
Variable: Yes
Restrictions: None
This flag determines whether to create a local or global variable binding. If unset, the variable is bound in the global variables. If set, the topmost current binding for the variable is replaced with the new value, provided this binding is within the context of the currently executing 'Procedure', 'Dependency' or 'Test-case' node. If no such binding exists, a new binding is created in the currently executing 'Procedure', 'Dependency' or 'Test-case' node or, if there is no such node, in the global bindings. See chapter 8 for a detailed explanation of variable binding and lookup.
Variable: No
Restrictions: None
This attribute determines the error level of the message that is logged in case of failure. Possible choices are message, warning and error.
Note If the attribute 'Throw exception on failure' is set, this attribute is irrelevant and if 'Variable for result' is set this attribute is ignored.
Variable: No
Restrictions: None
Throw an exception in case of failure.
For 'Check...' nodes a CheckFailedException is thrown,
for 'Wait for...' nodes the respective specific exception.
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: No
Restrictions: None
| 'Wait for download to finish' |
Contained in: All kinds of sequences.
Children: None
Execution:
The target file identifying the download is sent to the SUT where QF-Test waits for the
download to finish or the time limit is exceeded in which case a
DownloadNotCompleteException is thrown.
Attributes:
|
| ![]() |
||
|
| Figure 30.66: 'Wait for download to finish' attributes | ||
The name of the SUT client process from which to query the data.
Variable: Yes
Restrictions: Must not be empty.
The target file for the downloaded.
Variable: Yes
Restrictions: Valid file name
Time limit in milliseconds.
Variable: Yes
Restrictions: >= 0
If this attribute is set and the timeout is exceeded without the download finishing the download is canceled.
Variable: Yes
Restrictions: None
This optional attribute determines the name for the result variable of the action. If set, the respective variable will be set to 'true' for a successful check or wait and to 'false' in case of failure.
Note If this attribute is set, the attribute 'Error level of message' is ignored and no error is reported. The attribute 'Throw exception on failure' always remains effective, so it is possible to set a result variable and still throw an exception.
Variable: Yes
Restrictions: None
This flag determines whether to create a local or global variable binding. If unset, the variable is bound in the global variables. If set, the topmost current binding for the variable is replaced with the new value, provided this binding is within the context of the currently executing 'Procedure', 'Dependency' or 'Test-case' node. If no such binding exists, a new binding is created in the currently executing 'Procedure', 'Dependency' or 'Test-case' node or, if there is no such node, in the global bindings. See chapter 8 for a detailed explanation of variable binding and lookup.
Variable: No
Restrictions: None
This attribute determines the error level of the message that is logged in case of failure. Possible choices are message, warning and error.
Note If the attribute 'Throw exception on failure' is set, this attribute is irrelevant and if 'Variable for result' is set this attribute is ignored.
Variable: No
Restrictions: None
Throw an exception in case of failure.
For 'Check...' nodes a CheckFailedException is thrown,
for 'Wait for...' nodes the respective specific exception.
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: No
Restrictions: None
| 'Load resources' |
|
|
This node is used to load a |
Contained in: All kinds of sequences.
Children: None
Execution:
The ResourceBundle is loaded and its values are made
available under the 'Group' name.
Attributes:
|
| ![]() |
||
|
| Figure 30.67: 'Load resources' attributes | ||
The name of the group by which values of the
ResourceBundle are referred to.
The value of a definition of the form
name=value in the ResouceBundle
can be retrieved with
${group:name} (see section 8.4).
Variable: Yes
Restrictions: Must not be empty and should not contain special characters like ':' or '$'.
The name of the ResourceBundle to load.
A little Java background is needed to understand this
attribute.
The resources are read with the help of the Java method
ResourceBundle.getBundle(). For this to work, a
matching file with the extension .class or
.properties must be located somewhere on the
CLASSPATH. Use the fully qualified name for the
file, including packages, with a dot ('.') as separator, but
without extension or locale identifier.
Example: QF-Test comes with a German
ResourceBundle in the file
de/qfs/apps/qftest/resources/properties/qftest_de.properties,
which is contained in the archive qfshared.jar.
To load that ResourceBundle, set this attribute to
de.qfs.apps.qftest.resources.properties.qftest and
the 'Locale' to de.
Variable: Yes
Restrictions:
Must name a ResourceBundle on the
CLASSPATH.
The main use of ResourceBundles is to provide data
in different languages. This attribute determines, which version
of a ResourceBundle is retrieved. The value must
follow the ISO standard
language_country_variant. Language
is a two letter lowercase code like en for English,
country a two letter uppercase code like
US for American or UK for British
English. The variant discriminates further but is rarely
used.
As mentioned, QF-Test relies on the Java method
ResourceBundle.getBundle() to load the
ResourceBundle, which is described in detail in the
Java documentation and works as follows:
To load a ResourceBundle named res for
the locale en_US, Java first searches the
CLASSPATH for a file named
res_en_US.class or
res_en_US.properties, then for
res_en.class or res_en.properties and
finally for res.class and
res.properties. The less specific files are loaded
even if more specific files are found, but only values not
defined in the more specific files are used. That way you can
define all English resources in res_en.properties
and place only those that differ in
res_en_UK.properties and
res_en_US.properties.
Unfortunately Java has a "feature" that can lead to surprising
results. If no specific file but only the base file
res.properties is found,
Java tries the whole process a second time, this time for the
current default locale of the VM. As a result, if the
current locale for QF-Test is German and you want to load
English resources that are defined in
res.properties and no
res_en.properties exists, Java will load the
German version from
res_de.properties, even if you request the locale
en. You can work around this be setting this
attribute to the underscore '_'. In that case, only the base
file res.properties is loaded.
To use the current locale of the VM, leave this value empty.
Variable: Yes
Restrictions: Empty or valid locale identifier.
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: No
Restrictions: None
| 'Load properties' |
|
|
This node is used to load data from a
|
Contained in: All kinds of sequences.
Children: None
Execution:
The Properties file is loaded and its values are made
available under the 'Group' name.
Attributes:
|
| ![]() |
||
|
| Figure 30.68: 'Load properties' attributes | ||
The name of the group by which values of the
Properties file are referred to.
The value of a definition of the form
name=value in the Properties file
can be retrieved with
${group:name} (see section 8.4).
Variable: Yes
Restrictions: Must not be empty and should not contain special characters like ':' or '$'.
The file to load the Properties from. This can
either be an absolute path name or a path relative to the
directory of the current suite. In either case you should always
use '/' as the separator for directories, even under Windows.
QF-Test will translate this to the correct value for the
current operating system.
The "..." button brings up a dialog in which you can select the file interactively. You can also get to this dialog by pressing [Shift-Return] or [Alt-Return], when the focus is in the text field.
Variable: Yes
Restrictions: Must be an existing Properties
file.
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: No
Restrictions: None
| 'HTTP Request' |
|
|
This highly specialized node sends a GET or POST request via HTTP/HTTPS directly to a web server. Such a request can be very helpful for load tests or mass data computing scenarios (e.g. filling out a form) since the simulation of user interactions and the respective loading time of the SUT are omitted during replay. The use of requests is an enhancement of the functionalities for load tests and data-driven testing described in chapter 21 and section 30.4. If the status code returned from the server is 400 or higher, a corresponding error message is created in the run-log. A detailed description of the different status codes can be found at http://www.w3.org/Protocols/HTTP/HTRESP.html. Additionally you can store the response from the server in a variable and if the attribute 'Add server response to run-log' is active the response is also written to the run-log. |
Contained in: All kinds of sequences.
Children: None
Execution: The GET/POST request is sent directly by QF-Test via HTTP/HTTPS to the specified URL. If the status code returned from the server is not equal to 200 (status=OK) a corresponding error message is created in the run-log.
Attributes:
|
| ![]() |
||
|
| Figure 30.69: 'HTTP Request' Attribute | ||
The URL to which to send the request, not including parameters. HTTP and HTTPS are acceptable values for the protocol.
Variable: Yes
Restrictions: Must not be empty.
This attribute defines the method of the request, GET or POST.
Variable: No
Restrictions: None
Here you can specify the parameters for the request. See subsection 2.2.5 for further information how to work with the table.
Variable: Yes
Restrictions: None
The name of the variable to which the server response is assigned (see chapter 8).
Variable: Yes
Restrictions: None
This flag determines whether to create a local or global variable binding. If unset, the variable is bound in the global variables. If set, the topmost current binding for the variable is replaced with the new value, provided this binding is within the context of the currently executing 'Procedure', 'Dependency' or 'Test-case' node. If no such binding exists, a new binding is created in the currently executing 'Procedure', 'Dependency' or 'Test-case' node or, if there is no such node, in the global bindings. See chapter 8 for a detailed explanation of variable binding and lookup.
Variable: No
Restrictions: None
If activated the server response is written to the run-log in addition to the status code.
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: No
Restrictions: None
| Last update: 01/27/2012 Copyright © 1999-2012 Quality First Software GmbH |