| Version 3.4.7 |
| Processes |
In order to enable QF-Test to communicate with the SUT, the SUT's process must be started by QF-Test. For details about how the application is started by QF-Test and which kind of node is most applicable in your case, see chapter 4.
The following nodes are used to start or stop processes, to wait for a connection with the SUT or to wait for the termination of a process and check its exit value. The number of concurrent processes managed by QF-Test is limited only by the underlying system, but you have to assign a unique name to each process by which other nodes will identify it.
We will refer to processes run by QF-Test as clients. QF-Test distinguishes between two types of clients: arbitrary processes that are simply started and stopped and SUT clients, the actual Java applications that QF-Test interacts with.
Standard input and output of a client is redirected to a terminal that you can open from the »Clients« menu. The client's output is also stored in the log of a test run.
| 'Start Java SUT client' |
|
|
This node provides the standard and most flexible way of starting an SUT client. To use it, you must know the Java command that starts your application. If the SUT is run through a script, use a 'Start SUT client' node instead (see chapter 4). |
Contained in: All kinds of sequences.
Children: None
Execution: The command line for the program is built from the attributes and the process is started. Its input and output are redirected to QF-Test.
Attributes:
|
| ![]() |
||
|
| Figure 30.39: 'Start Java SUT client' attributes | ||
This is the identifier for the SUT client. It must remain unique as long as the process is alive. Other nodes will refer to the client by this name.
Variable: Yes
Restrictions: Must not be empty
The Java program to run, typically java or
javaw on Windows. If you want to run a specific
Java virtual machine you should give the full path name of the
executable.
The file button
brings up a dialog in which you can
select the program 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 not be empty
Here you can set the working directory for the program. If you leave this value empty, the program will inherit QF-Test's working directory.
The directory button
brings up a dialog in which you can select the
directory 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 empty or an existing directory
The fully qualified name of the Java class of the SUT whose
main(String[]) method will be called. If your
application is run from an executable jar archive with the
-jar parameter, you must leave this attribute empty.
Note QF-Test can only run the
main method of the class if both the class itself
and the main method are declared public. Please
verify this if you get an IllegalAccessException
when you try to start your application.
Variable: Yes
Restrictions: Valid class name
There is one tab for each of the following parameter lists:
The command line arguments for the Java executable. Put each parameter on a line of its own. Special quoting of whitespace or symbols is not required.
For example to set the classpath, set one line to
-classpath and the following line to the
desired value of the classpath. You don't need to concern
yourself with QF-Test's jar files.
These are the arguments that are passed to the
main(String[]) method of the class to be
started. Again, each argument requires a row of its own and
special quoting is not required.
Extra parameters for the class
de.qfs.apps.qftest.start.StartClient which is
the wrapper class started by QF-Test in order to gain
access to the EventQueue, establish an RMI
connection between the SUT and QF-Test and then start the
main class of the SUT. These parameters are intended for
future extensions, scripting and internal logging.
See subsection 2.2.5 about how to work with the tables.
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
| 'Start SUT client' |
|
|
If your application is normally started through a shell script or a special executable starter, the most convenient way to run it from QF-Test is through this kind of node. Depending on how the application is actually started by this script, some modifications may be required. A typical symptom is that the SUT starts up fine, but the connection to QF-Test is not established. In that case, read chapter 4. |
Contained in: All kinds of sequences.
Children: None
Execution: The command line for the program is built from the attributes and the process is started. Its input and output are redirected to QF-Test.
Attributes:
|
| ![]() |
||
|
| Figure 30.40: 'Start SUT client' attributes | ||
This is the identifier for the SUT client. It must remain unique as long as the process is alive. Other nodes will refer to the client by this name.
Variable: Yes
Restrictions: Must not be empty
The program to run. If the executable file is not located in a
directory on the PATH you must give the full
path name.
The file button
brings up a dialog in which you can select the
program 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 not be empty
Here you can set the working directory for the program. If you leave this value empty, the program will inherit QF-Test's working directory.
The directory button
brings up a dialog in which you can select the
directory interactively. You can also get to this dialog by
pressing [Shift-Return] or
[Alt-Return], when the focus is
in the text field.
Note This directory will become the current
working directory after executing the
program. As a result, a script named, say,
./copy_data will be looked up relative to QF-Test's
working directory and not the directory given. Only the path
names referred to in the script itself will be resolved relative
to the new directory.
Variable: Yes
Restrictions: Must be empty or an existing directory
There is one tab for each of the following parameter lists:
The command line arguments for the executable. Put each parameter on a line of its own. Special quoting of whitespace or symbols is not required.
Extra parameters for the class
de.qfs.apps.qftest.start.StartClient which is
used to gain access to the EventQueue,
establish an RMI connection between the SUT and QF-Test
and then start the main class of the SUT. These parameters
are intended for future extensions, scripting and internal
logging.
See subsection 2.2.5 about how to work with the tables.
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
| 'Start browser' |
|
|
This node is used to start a web browser specifically for web testing. To test a Java applet in a browser, use a 'Start SUT client' node instead. If the process for the SUT is already running, this node can also be used to open an additional browser window in the same process. |
Contained in: All kinds of sequences.
Children: None
Execution: The command line for the browser program is built from the attributes and the process is started. Its input and output are redirected to QF-Test.
Attributes:
|
| ![]() |
||
|
| Figure 30.41: 'Start browser' attributes | ||
This is the identifier for the SUT client. It must remain unique as long as the process is alive. Other nodes will refer to the client by this name.
Variable: Yes
Restrictions: Must not be empty
The URL of the web page to be shown in the browser. As a special case the URL "about:nowindow" can be used to start the SUT process without opening an initial browser window. In that state, cache or preference settings for the browser can be modified which may be a prerequisite for opening a given URL. The browser window with the actual target URL can then be opened via another 'Start browser' node.
Variable: Yes
Restrictions: Must not be empty
If this attribute is set, QF-Test will try to open another browser window in an existing SUT client instead of starting a new process. Of course in that case the SUT client must already be running.
Variable: Yes
Restrictions: None
The kind of browser to open a window for. Currently supported values are "ie" for Internet Explorer and "mozilla" for Mozilla derivatives like Firefox, SeaMonkey or Mozilla itself. It is possible to open browser windows for different browser types in the same SUT client.
Variable: Yes
Restrictions: Currently only "ie" or "mozilla" are supported.
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. Here you can specify the name for the browser window to be opened.
Variable: Yes
Restrictions: None
For Mozilla and Mozilla-based browsers the installation directory of the browser must be set here.
Variable: Yes
Restrictions: Must be empty (for ie) or an existing directory
These optional attributes for the X/Y coordinate, width and height can be used to specify the geometry of the browser window to open.
Variable: Yes
Restrictions: Width and height must not be negative.
There is one tab for each of the following parameter lists:
Special command line arguments for the java executable in which the browser is embedded. Can be used to specify the available memory (default is 200MB), define system properties, enable debugging, etc. Put each parameter on a line of its own. Special quoting of whitespace or symbols is not required.
Extra parameters for the QF-Test wrapper that embeds the browser and establishes an RMI connection between the SUT and QF-Test. These parameters are intended for future extensions, scripting and internal logging.
See subsection 2.2.5 about how to work with the tables.
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
| 'Start process' |
|
|
To run an arbitrary program during a test, you can either use this node or an 'Execute shell command' node. This node is preferable if you need to pass possibly complex arguments to the executable. |
Contained in: All kinds of sequences.
Children: None
Execution: The command line for the program is built from the attributes and the process is started. Its input and output are redirected to QF-Test.
Attributes:
|
| ![]() |
||
|
| Figure 30.42: 'Start process' attributes | ||
This is the identifier for the SUT client. It must remain unique as long as the process is alive. Other nodes will refer to the client by this name.
Variable: Yes
Restrictions: Must not be empty
The program to run. If the executable file is not located in a
directory on the PATH you must give the full
path name.
The file button
brings up a dialog in which you can select the
program 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 not be empty
Here you can set the working directory for the program here. If you leave this value empty, the program will inherit QF-Test's working directory.
The directory button
brings up a dialog in which you can select the
directory interactively. You can also get to this dialog by
pressing [Shift-Return] or
[Alt-Return], when the focus is
in the text field.
Note This directory will become the working directory of the newly
started process. It does not affect the working directory of QF-Test. As a result, a
program named, say, ./startserver will be looked up relative to QF-Test's
working directory and not the directory given. Only the path names referred to in
the program itself will be resolved relative to the given directory.
Variable: Yes
Restrictions: Must be empty or an existing directory
The command line arguments for the executable. Put each parameter on a line of its own. Special quoting of whitespace or symbols is not required.
See subsection 2.2.5 about how to work with the tables.
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
| 'Execute shell command' |
|
|
This node is a convenient way to execute shell commands during a
test. The shell that will execute the command can be specified
with the command line arguments When the shell is started it is treated like every other process started by QF-Test, so you can kill it or wait for it to terminate and check its exit code. |
Contained in: All kinds of sequences.
Children: None
Execution: A shell is started to execute the command. Its input and output are redirected to QF-Test.
Attributes:
|
| ![]() |
||
|
| Figure 30.43: 'Execute shell command' attributes | ||
This is the identifier for the SUT client. It must remain unique as long as the process is alive. Other nodes will refer to the client by this name.
Variable: Yes
Restrictions: Must not be empty
The command to execute in the shell. Enter this just as you would at the command prompt.
WindowsOn Windows systems, quoting of arguments
with blanks can be a little tricky. If you're using the standard
Windows shell, simply use double quotes as always, for example
dir "C:\Program Files". If you're using a Unix
shell on Windows by specifying the -shell <executable> command line
argument, use single quotes instead, i.e. ls 'C:/Program
Files'.
Variable: Yes
Restrictions: Must not be empty
Here you can set the working directory for the shell. If you leave this value empty, the shell will inherit QF-Test's working directory.
The directory button
brings up a dialog in which you can select the
directory 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 empty or an existing directory
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
| 'Wait for client to connect' |
|
|
This node is used to make sure that the connection to a client is
established. If after a configurable timeout the client is still
not connected, a |
Contained in: All kinds of sequences.
Children: None
Execution: QF-Test waits until either the connection to the Java client is established or the timeout is up.
Attributes:
|
| ![]() |
||
|
| Figure 30.44: 'Wait for client to connect' attributes | ||
The name of the Java client to wait for.
Variable: Yes
Restrictions: Must not be empty
Time limit in milliseconds.
Variable: Yes
Restrictions: >= 0
The GUI engine to wait for. Only relevant for SUTs with more than one GUI engine as described in chapter 34.
Variable: Yes
Restrictions: See chapter 34
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: Yes
Restrictions: None
| 'Stop client' |
|
|
This node forcibly terminates a client process started by
QF-Test. If the process has already terminated, nothing is
changed. Otherwise, if the client is an SUT client, QF-Test
first tries to call the Java method
WindowsNote: On Windows child processes started by a
process are not terminated when the parent process is killed. As
explained in chapter 4, the
|
Contained in: All kinds of sequences.
Children: None
Execution: Terminates the last process that was started under the given name.
Attributes:
|
| ![]() |
||
|
| Figure 30.45: 'Stop client' attributes | ||
The client name of the process that is to be killed.
Variable: Yes
Restrictions: Must not be empty
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
| 'Wait for process to terminate' |
|
|
This node waits until a process that was started by QF-Test
terminates. If a given time limit is exceeded and the process is
still alive. Per default a |
Contained in: All kinds of sequences.
Children: None
Execution: Waits for the end of a process and checks its exit value unless the timeout is exceeded.
Attributes:
|
| ![]() |
||
|
| Figure 30.46: 'Wait for process to terminate' attributes | ||
The client name of the process to wait for.
Variable: Yes
Restrictions: Must not be empty
Time limit in milliseconds.
Variable: Yes
Restrictions: >= 0
If this attribute is set it is used to validate the exit code of
the process. The type of the comparison is defined by prepending
one of the
four operators
==, !=,
< and >.
Just a number without preceding operation test for equality.
If the test fails, an
UnexpectedExitCodeException is thrown.
The exception won't be thrown, if the attribute 'Throw exception on failure' is not set.
Examples: If this attribute is set to 0, every exit code that is not 0 causes an exception. This is the same as for ==0. A value of >0 causes an exception for every exit code equal to or less than 0. This exception can be suppressed by un-checking the attribute 'Throw exception on failure'.
Variable: Yes
Restrictions: See above
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: Yes
Restrictions: None
| Last update: 04/23/2012 Copyright © 1999-2012 Quality First Software GmbH |