|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.|
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.
- 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.)
- Start the Squish for Qt IDE.
- Load the Squish for Qt test suite.
- Start the Squish for Web IDE.
- Load the Squish for Web test suite.
This recording has to be integrated into the Squish for Qt 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 Qt and web applications. With these application contexts we can switch between automating each application, should it be required, by using the setApplicationContext() function.
- 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():
Example - Recording on other applications
How to Test Multiple AUTs from a Single Test Script, Using ApplicationContext
How to Use ApplicationContext Objects