Overview¶
The information below describes the setup for Squish for Windows and Squish for Web, but the instructions are not limited to these Squish editions, but apply to all/most editions of Squish.
Basic setup¶
Install Squish for Windows.
Install Squish for Web.
Create a Squish for Windows test suite with the Squish for Windows IDE.
Create a Squish for Web test suite with the Squish for Web IDE.
Share the names.* file across both test suites (see Shared and Split Script-Based Object Maps ).
Decide which of the two test suites should be the main test suite. (The remainder of this article assumes a Squish for Windows test suite to be the main test suite.)
Recording¶
Recording in the Windows application¶
Start the Squish for Windows IDE.
Load the Squish for Windows test suite.
Record.
Example recording:
Recording in the Web application¶
Start the Squish for Web IDE.
Load the Squish for Web test suite.
Record.
Example recording:
This recording has to be integrated into the Squish for Windows test suite now, which is a simple copy & paste operation at first:
Then we add these lines (which are the equivalent of "startApplication()" but for the web browser):
So the resulting script looks like this:
As you can see we also modified the startApplication() lines to catch the return values, which are the application context of the Windows and web applications. With these application contexts we can switch between automating each application, should it be required, by using the setApplicationContext() function.
Replay¶
- Start
squishserver
of Squish for Web on the same port as specified in the startApplication() call that starts the web browser (1234):
Start Squish for Windows IDE.
Load Squish for Windows test suite.
Execute Squish for Windows test suite.
You can switch between application contexts via setApplicationContext():