background image
<< Multi-Application - Recording window declarations for remote machines | Multi-Application - GUI-based applications >>
Multi-Application - template.t explained
<< Multi-Application - Recording window declarations for remote machines | Multi-Application - GUI-based applications >>
User's Guide
387
22 M
ULTI
-A
PPLICATION
T
ESTING
template.t explained
template.t explained
The following line of code is the first required line in a multi-application
testcase file. It is the testcase declaration. Note that it does not pass an
application state as in the stand-alone environment.
multitestcase MyTest (STRING sMach1, STRING sMach2)
In the multi-application environment the arguments to your testcase are
names of the machines to be tested; you specify application states inside the
testcase, as will be explained shortly. You can code the machine names
argument(s) as you wish. For example, you can pass a file name as the only
argument and then in the testcase you can read the names of the machines
from that file. Or you can define a
LIST OF HMACHINE
data structure in your
testplan (if you are using QA Organizer) to specify the required machines and
pass the name of the list when you invoke the testcase from the testplan. This
template assumes that you are using a testplan and that it passes the Agent
names when it invokes the testcase. For this example, the testplan might
specify the following:
Mytest ("Client1", "Client2")
The next two code lines are the first required lines in the testcase:
SetUpMachine (sMach1, MyFirstApp, "MyFirstAppState")
SetUpMachine (sMach2, My2ndApp, "My2ndAppState")
You must execute the SetUpMachine function for every client machine that
will be tested. For each SetUpMachine call, you specify the application to be
tested (by passing the name of the main window) and the state to which you
want the application to be set (by passing the name of the application state if
you defined one).
The SetUpMachine function issues a Connect call for a machine you want to
test and then configures either the base state or a specified application state.
It does this as follows:
It associates the client application's main window name with the
specified machine so that the DefaultBaseState function can
subsequently retrieve it to set the base state.
It associates the name of the application's base state (if one is specified)
with the specified machine so that the SetMultiAppStates function can
subsequently retrieve it and set the application to that state at the start of
the testcase.