background image
<< Multi-Application - Required testcase code | Multi-Application - Recording window declarations for remote machines >>
Multi-Application - invokes SetMultiBaseStates and DisconnectAll
<< Multi-Application - Required testcase code | Multi-Application - Recording window declarations for remote machines >>
User's Guide
385
22 M
ULTI
-A
PPLICATION
T
ESTING
Testcase structure in a multi-application environment
·
SetUpMachine -- connects SilkTest to an Agent on the specified
machine. It provides a way to associate a main window declaration and
an application state function with a machine name. These parameters are
stored as data accessible by means of the GetMachineData function.
Both of these names (the second and third arguments to the function) are
optional; however, if you omit both arguments, you will have no recovery
system.
·
DefaultMultiTestCaseEnter -- executes at the beginning of a
multitestcase. It invokes a DisconnectAll function. The invocation of the
SetAppState function is performed by the SetMultiAppStates function
because the DefaultTestCaseEnter function is not executed for a
multitestcase.
·
DefaultMultiTestCaseExit -- executes just before a multitestcase
terminates. It logs any pending exception, then invokes
SetMultiBaseStates and DisconnectAll.
Other include files
In the client/server environment, as opposed to the stand-alone environment,
you can test two or more different applications at the same time. For example,
you could run the functional tests for application "A" on a Microsoft
Windows machine and a Motif-based machine at the same time that you are
running the functional tests for application "B" on both Windows and Motif-
based machines. The include file(s) that you must generate may therefore
have to take into consideration different platforms and/or different
applications.
When you are driving two or more applications from SilkTest, you need
separate window declarations for each different application. You must be
certain that your main window declaration for each separate application is
unique. If the same application is running on different platforms
concurrently, you may need to use GUI specifiers to specialize the window
declarations. 4Test will identify a window declaration statement that is
preceded by a GUI specifier (for example, motif
)
as being true only on the
specified GUI. Please see Chapter 13, "Porting Tests to Other GUIs", for
more details on GUI specifiers.
In addition, you may find that the operations needed to establish a particular
application state are slightly different between platforms. In this case, you
just record application states for each platform and give them names that
identify the state and the GUI (for your convenience). This chapter explains
how you map the application state to the machine that requires it, using the
SetUpMachine function.