Article - Automating multiple applications with multiple Squish installations or editions (Windows, Web)

Skip to end of metadata
Go to start of metadata

Table Of Contents

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 objects.map file across both test suites (see Sharing an Object Map across test suites).
  • 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:

test.py

Recording in the Web application

  • Start the Squish for Web IDE.
  • Load the Squish for Web test suite.
  • Record.

Example recording:

test.py

This recording has to be integrated into the Squish for Windows test suite now, which is a simple copy & paste operation at first:

test.py

Then we add these lines (which are the equivalent of "startApplication()" but for the web browser):

So the resulting script looks like this:

test.py

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():

test.py

Further information

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.