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

Skip to end of metadata
Go to start of metadata
The information below describes the setup for Squish for Qt and Squish for Web, but the instructions are not limited to these Squish editions, but apply to all/most editions of Squish.

Table Of Contents

Overview

Using multiple Squish editions in a single test script is possible and this article describes an example setup and work-flows for this utilizing Squish for Qt and Squish for Web, but these instructions generally apply to any combination of Squish editions used in a single test script.

Basic setup

  • Install Squish for Qt.
  • Install Squish for Web.
  • Create a Squish for Qt test suite with the Squish for Qt IDE.
  • Create a Squish for Web test suite with the Squish for Web IDE.
  • Share the objects.map file across both test suites (see How can I share 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 Qt test suite to be the main test suite.)

Recording

Recording in the Qt application

  • Start the Squish for Qt IDE.
  • Load the Squish for Qt 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 Qt 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 Qt 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 Qt IDE.
  • Load Squish for Qt test suite.
  • Execute Squish for Qt test suite.

You can switch between application contexts via setApplicationContext():

test.py

Further information

Example - Recording on other applications
Application Context
How to Test Multiple AUTs from a Single Test Script, Using ApplicationContext
How to Use ApplicationContext Objects
setApplicationContext()
currentApplicationContext()
applicationContextList()

Labels:
multi multi Delete
multiple multiple Delete
qt qt Delete
web web Delete
duoedtion duoedtion Delete
editions editions Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.