3.1. Installing the Command Line Tools, Server, and IDEs

Table of Contents

3.1.1. Installing from Binary Packages
3.1.2. Installing Squish for Qt from Desktop Source Packages
3.1.3. Installing Squish for Qt from Embedded Source Packages
3.1.4. Installing Squish for Qt for iOS testing
3.1.5. Installing Squish for Qt for Android testing
3.1.6. Distributing and Sharing an Installation
3.1.7. Installing Squish for Web
3.1.8. Installation for Flex applets in web pages
3.1.9. Installing Squish for Android

3.1.1. Installing from Binary Packages

In most cases, Squish can be installed from a binary package. These simply need to be unpacked and then configured to make Squish ready for use.

Binary packages are available for Linux®, macOS®, and Microsoft® Windows®. Different versions of each Squish edition are provided to ensure the tightest possible integration between Squish, the operating system, and the applications or websites you want to test. In view of this, the first step to installing Squish is to choose the correct package for your machine.

3.1.1.1. Choosing the Correct Squish Package

The binary Squish packages are available in your Customer Download Area on the froglogic website. To find out which package you need, the first thing you need to know is what toolkit is used to build the applications you are going to test. The toolkit could be Qt®, Java™, native Windows (e.g., MFC or .NET), macOS (i.e., Cocoa), Web, and so on. You also need to know which operating system you are going to use to test the applications, e.g., Linux, macOS, or Microsoft® Windows.

If you will be testing Qt applications, you need to collect some additional technical information in order to choose the correct package:

  1. Which version of Qt is used by the application you want to test?

  2. Which compiler (and which version of the compiler) was used to compile the Qt library (and the application which you want to test)?

If you don't know this information, you'll need to ask one of the application's developers. Once you know the operating system, Squish edition, toolkit version, and the compiler name and version, you can identify the correct Squish package as follows: Every Squish package name is of the form squish-<squishVersion>-toolkit<toolkitVersion>-<platform>-<compiler> and ending with .exe (on Windows), .run (on Linux) or .dmg (on macOS). Some package names don't specify the <toolkitVersion>, in which case the package can be used with any version of the toolkit; others have an x in the toolkit version, in which case they can be used with a version of the toolkit that has any digit in that position—so qt43x means any Qt 4.3 version, Qt 4.3.0, Qt 4.3.1, and so on. Some packages don't specify the <compiler>, in which case they can be used with any compiler that runs on the platform. Some examples are shown in the table below.

Squish packages for macOS machines—and that are processor-dependent—embed a processor identifier in their name, e.g., macppc for PowerPC processors and i386 for Intel processors. Similarly, some Java™ packages specify whether they are for 32-bit or 64-bit machines (e.g., using java-win32 or java-win64 in their names). Yet in some cases the architecture of the machine doesn't matter. For example, Squish for Windows (i.e., for applications using the native MFC or .NET toolkit) is designed to work with all Windows compilers and with both 32-bit and 64-bit versions of Windows—so in this case the package names just have the Squish version, e.g., squish-6.1.0-windows.exe.

Table 3.1. A Cut-Down List of Example Package Names

Example Package NameDescription
squish-6.1.0-qt47x-linux64.runSquish 6.1.0 for 64-bit AUTs running on Linux and built with Qt 4.7.x and using any compiler
squish-6.1.0-qt42x-win32-msvc7.exeSquish 6.1.0 for 32-bit AUTs running on Windows and built with Qt 4.2.x using the MSVC 7.1 (.NET 2003) compiler.
squish-6.1.0-qt45x-win64-msvc8.exeSquish 6.1.0 for 64-bit AUTs running on Windows and built with Qt 4.5.x using the MSVC 8.0 (2005) compiler.
squish-6.1.0-qt45x-macppc-gcc4.0.dmgSquish 6.1.0 for AUTs running on PPC macOS machines and built with Qt 4.5.x using the GCC 4.0 compiler.
squish-6.1.0-qt45x-maci386-gcc4.0.dmgSquish 6.1.0 for AUTs running on Intel macOS machines and built with Qt 4.5.x using the GCC 4.0 compiler.
squish-6.1.0-web-win32.exeSquish 6.1.0 for Web using a 32-bit browser on Windows.
squish-6.1.0-web-linux32.runSquish 6.1.0 for Web using a 32-bit browser on Linux.
squish-6.1.0-web-mac.dmgSquish 6.1.0 for Web using a 32-bit browser on macOS.
squish-6.1.0-java-win32.exeSquish 6.1.0 for Java—all 32-bit versions from 1.4 using AWT/Swing or SWT—running on Windows.
squish-6.1.0-java-win64.exeSquish 6.1.0 for Java—all 64-bit versions from 1.4 using AWT/Swing or SWT—running on Windows.


If you cannot find a Squish package in your customer area that matches your information, it is best that you build Squish from source. This will ensure that Squish integrates correctly with your local software configuration. Building Squish from source is described in Installing Squish for Qt from Desktop Source Packages (Section 3.1.2).

3.1.1.2. Configuring the Package

After you have decided which Squish package you need, download it from your customer area onto your computer, and execute it.

[Note]On Linux

On Linux, you need to make the .run file which you downloaded executable first. Popular desktop environments allow this by right-clicking the file and enabling the Execute permission. You can however also make the installer executable on the command line by executing:

$ chmod a+x <packagename>

The installation program will guide you through the configuration process by presenting multiple pages.

[Note]On Solaris & AIX

The following instructions depicting the installation procedure using the graphical installer only apply to Windows, Linux and macOS. For other platforms, such as Solaris or AIX, the Squish package is a plain ZIP archive. After uncompressing it, the installation is performed in text mode by running the squishconfig (Section 7.4.2) program.

The Squish setup program in action.

The installation program is shown running in the screenshot above (and in several screenshots that follow). However, the list of configuration steps varies depending on which edition of Squish you are installing, so don't be concerned if one or more of the configuration pages mentioned below is not presented to you, or if additional pages are shown.

[Tip]Changing Configuration Settings

Once you start the installation program, if you want to go back and change a setting you made during the configuration, you can use the Back button to go back to the relevant page, change the configuration setting, and then move forward again using the Next button.

3.1.1.2.1. Entering the License Key
The Squish setup program in action.

After acknowledging the welcome page by pressing the Next button at the bottom of the setup program's window, the next page will request you to enter the Squish license key. (If you already have a previous Squish installation on your computer—perhaps an evaluation version—or if you have already copied the license file to your HOME directory, and renamed it to start with a period, the license key will be shown in the input field.) If there is no license shown, or if you want to use a different one, enter your license here exactly as it appears in the squish-3-license file that is available in your download area, including any dashes (the 3 in the name here is historical and no longer related to the Squish version).

[Note]License File Location

The default location for the license key is $HOME on Unix-like systems and %HOMEPATH% (or %USERPROFILE% if %HOMEPATH% isn't defined) on Windows systems. This can be changed by setting the SQUISH_LICENSEKEY_DIR environment variable. (See Environment Variables (Section 7.5).)

Click the Next button to advance to the next step in the configuration process. If there are any problems with the license (for example, if it has expired or you mistyped it) then a message box will be shown, explaining the problem; you can then have another try.

3.1.1.2.2. Acknowledging the Terms of Use
A picture of the license test page from the froglogic Squish configuration program.

After entering your license key, you will be presented with the license under which you are permitted to use your copy of Squish. Please read the entire license text carefully before proceeding. Click one of the two radio buttons (I accept the license. or I do not accept the license.), that appear below the license text, to indicate whether you agree or disagree with the terms. If you disagree, then you cannot install or use Squish so you should click the Cancel button (or close the window) to terminate the installation.

[Note]License Text Differences

The license text varies depending on the license key—for example, the terms are different for evaluation versions than for paid for versions.

If you accept the license, the Next button will become enabled, so you can proceed to the next step of the configuration process.

3.1.1.2.3. Installation Folder

This step decides into which location on your system the Squish package will be uncompressed.

A picture of the target selection page from the froglogic Squish setup program.
3.1.1.2.4. Path to the Qt Library

This step is only necessary if you are configuring a Squish package set up for testing Qt applications on macOS, and if your license key entitles you to test Qt applications. If either of these conditions doesn't apply, this configuration page will not appear, in which case you can safely skip to the next section and continue from there.

A picture of the page from the froglogic Squish configuration program where you configure which Qt library should be used for the tested application.
[Note]Locating the Qt library

If you don't know where the library is stored on your computer, you could try using your system's Search facility, or you could ask your system administrator.

After specifying the path to the requested Qt library, use the Next button to advance to the next step of the setup.

3.1.1.2.5. Paths for Java™ Settings

This step is only necessary if you are configuring a Squish package set up for testing Java™ applications or if you are configuring a Squish package for testing Web applications and if your license key entitles you to test Java™ or Web applications. If either of these conditions doesn't apply, this configuration page will not appear, in which case you can safely skip to the next section and continue from there.

A picture of the page from the froglogic Squish configuration program where you configure the necessary Java paths.

In order to be able to test Java™ applications, you need to tell Squish where your Java™ runtime libraries are installed. If you are using the JavaSDK (Software Development Kit), then you must specify the runtime library directory—called jre—which is located inside the SDK's directory. If you only have the JRE (Java™ Runtime Environment) installed, then simply specify the JRE's directory (and not a directory inside the JRE).

After specifying the path to the Java™ runtime library, use the Next button to advance to the next step of the setup.

3.1.1.2.6. Ready to Install

At this point all the configuration options have been set and the installation is ready to launch. A page is shown which displays the disk space required by the selected Squish configuration.

A picture of the configuration review page from the froglogic Squish configuration program.

When you press the Next button on this page it means that the configuration shown will be saved to disk and Squish will use these settings from now on.

3.1.1.2.7. Executing the Installation

The installation program now commences installing Squish on your system. You can click the Show Details button to get a detailed list of actions performed as part of the installation.

A picture of the Squish setup program installating a package.

You can close the installer at any time, e.g. by closing the window or by pressing the Cancel button (only visible on platforms other than macOS). All changes done so far will be rolled back.

3.1.1.2.8. Concluding the Configuration

Congratulations! You have finished configuring Squish, and all the settings have been saved successfully. This page concludes the setup of your Squish binary package.

A picture of the final page from the froglogic Squish insatllation program.

You should now click the Finish button close the installation program. An option is presented which can be used to define whether the Squish IDE should be launched after the installation finished.

3.1.1.3. Performing Unattended Installations

It is possible to perform the installation of Squish completely unattended, passing any required values up front. Unattended installation requires no user interactions whatsoever and is equivalent to manually interacting with the installer interface. To perform an unattended installation, invoke the Squish installation program from the command line passing at least the argument unattended=1:

$ ./squish-6.1.0-windows unattended=1 <more options...>

That argument will launch the installation without any graphical user interface. Instead, progress information and potential error messages are written to the console.

In addition to the unattended=1 argument, you may want to specify further arguments to specify the target directory, the license key and further settings. Please see the installer reference documentation for a full list of recognised arguments.

In case any required values are missing, the installation will print a message and stop, e.g.:

$ ./squish-6.1.0-windows unattended=1
IFW Version: 2.0.81, built with Qt 5.5.0.
Build date: Nov 30 2015
Installer Framework SHA1: cf9e21b
[0] Language: en
[0] Arguments: ./squish-6.1.0-windows, unattended=1, targetdir=/tmp/foo
[4] Operations sanity check succeeded.
<..>
[162] Cannot perform unattended installation; target directory not specified.
[162] Please pass 'targetdir=<PATH>' on the command line.

Omitting optional arguments will make the installer pick a sensible default value. A message will be printed indicating this condition, and how to override it. For instance, here's the output generated while installing a Squish for Web package on macOS:

<..>
[569] No Firefox executable specified, using auto-detected path '/Applications/Firefox.app'
[569] Specify 'firefox=<PATH>' on the command line to override this.
[569] No Chrome executable specified, using auto-detected path '/Applications/Google Chrome.app'
[569] Specify 'chrome=<PATH>' on the command line to override this.
<..>

3.1.2. Installing Squish for Qt from Desktop Source Packages

In most situations Squish can be quickly and easily installed using one of the binary packages (see Installing from Binary Packages (Section 3.1.1)). However, if you prefer to build it from source—or if you must build it from source because no suitable binary package is available, or because you need to use features that require a source build—this section explains how to build it.

Once Squish is built, it can be distributed to different computers running the same operating system (see Distributing and Sharing an Installation (Section 3.1.6)).

Note that for source builds Squish is supplied as two separate packages—the Squish tools source package that must be built and the Squish IDE package that just needs to be installed. The tools are supplied as a .zip file for Windows and as a .tar.gz file on Unix-like platforms. Once the tools have been built (as described here), you can then go on to install the Squish IDE (see Standalone Installation of the IDE (Section 3.2)).

In many common cases the build process can be done in just a few simple steps, as described in Quick Install (Section 3.1.2.1). If your setup does not meet the Quick Install requirements, you can still build Squish from source, but you will need to follow one of the non-standard build processes that are documented after the Quick Install section.

3.1.2.1. Quick Install

This section covers the build of Squish from sources for testing of Qt applications build with a native compiler. This scenario is normally best covered through the use of a prebuilt binary package. In the case of non-standard compiler options or a non-standard Qt configuration it's necessary to compile Squish from sources using the very same compiler and Qt library that is being used for the appliction.

The most often found use case for such a minimal build is to create a custom build of those components that will have to match the environment of the tested application. The main influencing factors are the Qt libraries, compiler and hardware. Either of these may differ from the versions and configurations used for the pre-built binary packages.

The quickest route to such a customized installation

  • limits the components to be build from sources to those interacting with the AUT directly, and

  • makes use of a prebuilt binary package for the standard functionality.

Requirements

For a build and installation, certain requirements must be met. Some of these requirements concern the Qt library that Squish itself is built with, and some concern the tools used during the build.

The following minimal steps are based on a Linux/Unix system but will apply to other operating systems in a similar fashion.

It it assumed that a Squish source package has been unpacked into the directory C:\squish\ on Windows or /usr/local/squish/ on Linux/Unix, respectively. It is also assumed that your Qt installation is found in the directory C:\Qt or /usr/local/qt, respectively.

Start by changing to Squish's source directory.

Windows

C:\> cd \squish

Linux/Unix/macOS

$ cd /usr/local/squish

Now run the configuration script:

Windows

C:\squish> configure --with-qmake=C:\Qt\bin\qmake --disable-all --enable-idl --enable-qt

Linux/Unix/macOS

$ ./configure --with-qmake=/usr/local/qt/bin/qmake --disable-all --enable-idl --enable-qt

After the configure run has finished start the build process:

Windows

C:\squish> build

Linux/Unix/macOS

$ ./build

Further setup

The build instructions above take care of creating the components specific to your Qt installation. The other components like the Squish IDE and squishrunner can be taken from any Squish package for Qt 4 or 5 that matches the source packages version number. This would be squish-5.1.0-qt50x-linux64.zip or squish-5.1.0-qt48x-win32-msvc10.zip for Squish 5.1.0 for example.

Step 1 of 4

Install this package as if you would be testing an application build with a standard Qt library. To C:\squish-5.1.0-qt48x-win32-msvc10\ on Windows and /home/user/squish-5.1.0-qt50x-linux64 on Linux/Unix for example.

Step 2 of 4

To prepare an existing Squish desktop installation for copying custom Qt support into it issue the following in your Squish desktop directory:

Windows

C:\squish-5.1.0-qt48x-win32-msvc10> rd /q /s lib\extensions\qt

C:\squish-5.1.0-qt48x-win32-msvc10> del /q bin\winhook.dll bin\squishqt*.dll

C:\squish-5.1.0-qt48x-win32-msvc10> copy etc\paths.ini etc\paths.ini.bak

Linux/Unix/macOS

$ rm -r lib/extensions/qt

$ rm lib/libsquishqt*

$ cp etc/paths.ini etc/paths.ini.bak

Step 3 of 4

To install your custom Qt support into an existing Squish desktop installation, issue the following in your build directory:

[Note]Note

The paths used below are just examples, please adjust them to your setup.

Windows

C:\squish> build install DESTDIR=c:\squish-5.1.0-qt48x-win32-msvc10

Linux/Unix/macOS

$ ./build install DESTDIR=/home/user/squish-5.1.0-qt50x-linux64

Step 4 of 4

To finish setup of the customized Squish desktop installation issue the following in your Squish desktop directory:

Windows

C:\squish-5.1.0-qt48x-win32-msvc10> move /Y etc\paths.ini.bak etc\paths.ini

Linux/Unix/macOS

$ mv etc/paths.ini.bak etc/paths.ini

At this point this modified Squish binary package should be ready for use with your application.

3.1.2.2. Detailed Installation Instructions

This section describes how to perform a build and installation of Squish including various configuration options.

Requirements

For a build and installation, certain requirements must be met. Some of these requirements concern the Qt library that Squish itself is built with, and some concern the scripting languages you want to be able to use with Squish. Note that the reason JavaScript isn't mentioned is that Squish comes with its own built-in JavaScript interpreter and so does not depend on a third-party interpreter.

  • Qt 3.1.0 or greater must be available.

  • Qt must be configured and built with support for threads. (This is the default as of Qt 4.).

  • Qt must be configured and built as a shared library.

  • If you want to use Python as a scripting language for test scripts, then you must have Python 2.3+ or Python 3.4+ already installed with development headers.

  • If you want to use Perl as a scripting language for test scripts, then you must have Perl 5.8 or any later 5.x version installed.

  • If you want to use Ruby as a scripting language for test scripts, then you must have Ruby 1.9.

  • If you want to use Tcl as a scripting language for test scripts, then you must have Tcl 8.4 or later installed.

[Note]Qt 4-specific

If you want to use Qt 4, then you must either have built it with Qt3Support enabled, or alternatively if you don't want to enable Qt3Support, you must do a split build, in which case, see Installation for Testing Pure Qt 4 Applications (Section 3.1.2.3).

[Note]macOS-specific—Xcode Required

If you want to build Squish on macOS you must install Xcode—this will provide the compiler and related development tools.

Before building Squish you must make sure that you have the scripting languages you want to use for your test scripts already installed. (This does not include JavaScript which is built into Squish.) See the following tables regarding what you need to install and where to get it for your platform and scripting language.

LanguageWindows
Python We recommend installing the latest Python 2.x package available at http://www.python.org/download/. Download the “Windows x86 MSI Installer” or the “Windows x86-64 MSI Installer” depending on whether your compiler creates 32-bit or 64-bit Windows binaries.
PerlWe recommend installing ActiveState's Perl package. You can download it from http://www.activestate.com/activeperl/downloads/. It is supplied as an MSI installer—with versions for 32-bit and 64-bit processors. If you run the installer and accept all the default settings it will be installed in C:\Perl.
RubyThe official installation page for Ruby is http://www.ruby-lang.org/en/downloads/. Most Linux distributions will have it as a standard package.
TclWe recommend installing ActiveState's Tcl build. You can download it from http://www.activestate.com/activetcl/downloads/. It is supplied as a Windows setup program. If you run this and accept all the default settings it will be installed in C:\Tcl.
LanguageLinux/Unix
PythonThe Python interpreter executable must be in the PATH. Most Unixes already have Python pre-installed, but if it isn't, a package should be available from your system's package management tool, or you can download a version from http://www.python.org/download/. Note that if you install a package, you must install the -dev or -devel version, since Squish needs to access the header files when it is built.
PerlThe Perl interpreter executable must be in the PATH unless you specify a location for it using the --with-perl configure switch. Most Unixes already have Perl pre-installed, but if it isn't, a package should be available from your system's package management tool, or you can download a version from http://www.activestate.com/activeperl/downloads/. Note that if you install a package, you must install the -dev or -devel version, since Squish needs to access the header files when it is built.
RubyThe Ruby interpreter executable must be in the PATH unless you specify a location for it using the --with-ruby configure switch. Most Unixes already have Ruby pre-installed, but if it isn't (or is too old a version), a package should be available from your system's package management tool, or you can download a version from http://www.ruby-lang.org/en/downloads/. Note that if you install a package, you must install the -dev or -devel version, since Squish needs to access the header files when it is built.
TclMost Unixes already have Tcl installed, but if it isn't, a package should be available from your system's package management tool, or you can download a version from http://www.activestate.com/activetcl/downloads/. Note that if you install a package, you must install the -dev or -devel version, since Squish needs to access the header files when it is built.
LanguagemacOS
PythonA pre-installed version of Python is provided with macOS—this includes the headers and is sufficient for Squish's needs.
PerlA pre-installed version of Perl is provided with macOS—this includes the headers and should be sufficient for Squish's needs.
RubyAt the time of this writing Ruby 1.8 is the pre-installed version on macOS, and this is too old. To use Ruby on macOS you must build and install Ruby 1.9.
TclA pre-installed version of Tcl is provided with macOS—this includes the headers and is sufficient for Squish's needs.

If you want to use Squish to test Qt 3.x applications, see Installation for Testing Qt 3.x Applications (Section 3.1.2.4). If you want to test embedded Qt applications, see Installing Squish for Qt from Embedded Source Packages (Section 3.1.3).

Some of Squish's components must use the same Qt library as the application you want to test. If the Qt library your application uses does not fulfill the requirements above (i.e. it is not a shared, multi-threaded Qt library), you must do a split build of Squish (see Installation for testing with a single-threaded Qt library (Section 3.1.2.5)).

There are no additional requirements if you want to use JavaScript as a scripting language for test scripts: a small JavaScript interpreter is built into Squish. The JavaScript interpreter is automatically built unless JavaScript support is switched off using the configure program's --disable-js switch; see Configure Switches (Section 3.1.2.2.1).

Supported Platforms

Squish has been tested on a wide variety of Windows and Unix-like systems and with several different compilers. In the case of Windows, Squish has been tested on all modern versions (Windows 2000, Windows XP, Windows Vista, Windows 7 and Windows 8), with Microsoft® VC++ 6 through 2013, and with Intel C++ 7. For Unix-like systems, Squish has been tested on all modern versions of macOS with gcc and clag; on AIX 6.1 with xlC 9; on HP-UX 11.11 with aCC and gcc; on IRIX 6.5 with gcc and MIPSPro C++; on Linux with gcc and Intel C++ 7; on SUN Solaris 9 and 10 with gcc and SunCC; and on FreeBSD 6 with gcc.

The operating system versions and compiler versions mentioned here are not comprehensive, so if your particular setup isn't mentioned, Squish may well run perfectly well on your system—you can always contact support to ask whether your particular operating system/compiler combination is supported.

Building Squish

For ease of explanation, we will assume that you unpacked the Squish source into one of the directories below, depending on the platform you are using.

Windows

C:\squish

Linux/Unix/macOS

/usr/local/squish

You can of course install Squish anywhere on your machine, including a local install (e.g., somewhere in your HOME directory). Of course, if you don't have Administrator/superuser access rights you will have to do a local install. If you don't use one of the directories shown in the table above, simply change the directory to the one you do use, when following the instructions that follow.

The first step is to ensure that you have a license key. Download the file called squish-3-license from the download area where you obtained your Squish package. (This key is valid for both Squish 3 and Squish 4.) Copy (and rename) this file as follows:

Windows

%HOMEPATH%\.squish-3-license

Linux/Unix/macOS

$HOME/.squish-3-license

If %HOMEPATH% is not defined on your version of Windows, use %USERPROFILE% instead. Although we have assumed the use of the default location (i.e., %HOMEPATH% or $HOME), it is possible to store the license file in another directory by setting the SQUISH_LICENSEKEY_DIR environment variable. (See Environment Variables (Section 7.5).)

Notice the change of name to include a leading period. Alternatively, you can enter the license key contained in the file when configure (or the Squish IDE) asks for it.

[Note]Building Squish for Other Users

If you build Squish for another user, you must make sure that each user copies the license file into their own HOME directory.

Now Squish is ready to be configured according to your system's settings. On Windows you must be in a console window (sometimes call the Command Prompt or MS-DOS Prompt), on macOS in a Terminal.app window, and on other Unix-like systems in a shell window such as an xterm. (Note that for Unix-like systems we show $ as the prompt; it may differ on your system, but that doesn't matter.)

Start by changing to Squish's installation directory.

Windows

C:\> cd \squish

Linux/Unix/macOS

$ cd /usr/local/squish

Now run the configuration script:

Windows

C:\squish> configure

Linux/Unix/macOS

$ ./configure

The configure script searches for your C++ compiler, the Qt libraries that Squish depends on, the interpreters and header files for the third-party scripting languages Squish supports—Python, Perl, Ruby, and Tcl—and other system components that Squish may need, such as the Java runtime environment. The output indicates which compiler has been detected. If you are testing Qt applications, you should use the same compiler for Squish that you used to build Qt (if you built it yourself), and for your applications. If you want to force configure to use a different compiler from the one it detected, set the CXX environment variable to the executable of the compiler you want Squish to use, as the following examples illustrate.

Windows

If configure detected MSVC++ but you want to use Intel C++, run configure like this:

C:\squish> set CXX=icl

C:\squish> configure

Linux/Unix

If configure detected SunCC on Solaris, but you want to use gcc, run configure like this:

$ CXX=g++ ./configure

macOS

If configure detected the default gcc version, but you want to use gcc 3.3, run configure like this:

$ CXX=g++-3.3 ./configure

Now configure asks you to run the Squish build tool to compile Squish.

Windows

C:\squish> build

Linux/Unix/macOS

$ ./build

Building Squish can take quite a bit of time, since as part of the process the build tool also creates wrappers for the Qt library. As the build process progresses you will probably see a lot of warnings from the squishidl (Section 7.4.5) tool. It is safe to ignore these warnings.

Once the build process has finished, Squish is installed. The binaries and libraries are in the following directories:

Windows

C:\squish\bin

C:\squish\lib

Linux/Unix/macOS

/usr/local/squish/bin

/usr/local/squish/lib

You might want to add the bin directory to your PATH environment variable so you can invoke the Squish tools without specifying their path. How this is achieved depends on the platform.

Windows

Open the advanced system settings in the Windows control panel and append ;C:\Squish\bin at the end of the PATH environment value's text—notice the leading “;” to separate this path entry from the others.

Linux/Unix

Edit .bashrc (or the appropriate file for the shell you are using) and extend the PATH, for example, by writing: export PATH=$PATH:/usr/local/squish/bin, or if there is already a line like this simply by appending :/usr/local/squish/bin to the end of the line. Alternatively, you may prefer to create symbolic links, in /usr/local/bin, to the executables in /usr/local/squish/bin.

macOS

Edit .bashrc (or the appropriate file for the shell you are using) and extend the PATH, for example, by writing: export PATH=$PATH:/usr/local/squish/bin, or if there is already a line like this simply by appending :/usr/local/squish/bin to the end of the line. Alternatively, you may prefer to create symbolic links, in /usr/local/bin, to the executables in /usr/local/squish/bin.

3.1.2.2.1. Configure Switches

When invoked, configure tries to automatically detect your system's configuration system and the optimal configuration for Squish. In some cases, the results of the automatic detection or the defaults Squish uses do not match what you want. In these situations it is possible to override the detected and default settings by passing various command line options to configure.

Here are a few examples:

--disable-examples

See Partial Build for a complete explanation

--with-tclconfig=/usr/lib/tcl8.3

Tells configure which version of Tcl you want to use by specifying the path to the version-specific tclConfig.sh file.

--with-pydir=C:\Python26

Tells configure which directory contains the Python executable, e.g., on Windows, the directory containing python.exe

--with-qtdir=C:\Qt\4.7.0

Tells configure where the version of Qt you want to use is installed, overriding the QTDIR environment variable if it is set

--enable-64bit

Forces a 64-bit build on platforms where this is supported

For a complete list, execute configure --help on the command line or see configure (Section 7.4.13) in the reference manual.

Partial Build

By default, configure builds all the components that it can find. However, in some cases it may be desirable to only build those components that you actually need. You might want to minimize the components built because:

  • you want to produce a distributable installation that requires a minimal runtime installation on the target machine, and only the essential execution tools, like squishrunner, on the tester's machine;

  • you want to build with Qt libraries that have a different configuration from the Qt libraries needed by Squish itself, such as the configuration described in Installation for testing with a single-threaded Qt library (Section 3.1.2.5).

You can do a partial build by setting particular command line switches for configure that can be used to exclude (or include) various Squish components.

Squish can be told to build a particular component (providing it can find it) by using --enable-component and replacing component with the name of the component you want to build. Similarly, Squish can be told not to build a particular component by using --disable-component and again, replacing component with the name of the component—in this case of the one you don't want Squish to build. You can use as many enable and disable command line switches as you need. The components that you can choose to enable (if available) or disable are listed below.

all

use this to enable or disable all Squish's components—this is enabled by default which is why the build system builds everything it can find by default

server

the squishserver application (needed to run tests)—this is built by default

runner

the squishrunner application (needed to run tests)—this is built by default

explorer

the wrapper explorer (used for looking into wrapped libraries)—this is built by default

idl

the IDL compiler (needed for generating wrapper libraries)—this is built by default

wrappers

Squish's framework wrapper libraries—this is built by default

examples

the example applications and their tests (useful for following the tutorial and includes the examples used in the manual)—these are built by default

64bit

forces a 64-bit build on platforms where this is supported

pure-qt4

if enabled, tells Squish not to use Qt 3 support when testing Qt 4 applications

tk

Tk testing

For instance, if you don't want to build Squish's examples, you could configure and build Squish like this:

configure --disable-examples
build

You can combine these switches freely within the constraints of internal dependencies. This is where the all component comes in handy:

configure --disable-all --enable-idl --enable-server --enable-wrappers

This disables every component except for the server, the IDL compiler and the wrapper libraries. This might be useful in scenarios where one machine runs the squishserver, and other machines run the squishrunner.

Overriding Build Variables

When configure is run, it will output the configuration it creates—based on the components it automatically detects, but respecting any command line switches we have used to override the automatic detection—into the files config.h and Build.conf.

The config.h file is included with Squish's source code files, and the Build.conf file is used as an input file for the build tool. If the automatic detection produced unsatisfactory results, you could choose to modify these files before running the build application. The variables written to Build.conf can easily be changed, without needing to manually edit the file. This is achieved by specifying arguments of the form VARIABLE=value or VARIABLE+=value at the configure command line. These arguments will replace (if you use =) or extend (if you use +=), the named variables.

Here is an example that replaces a variable's value with a new value; in this case changing the default optimization flag:

configure "CXXOPT=-O1"

And here is another example, in this case we extend the values stored by two variables—the effect of this is to change the gcc compiler's default mode of operation, forcing it to do a 32-bit build on a 64-bit system:

configure "CXXFLAGS+=-m32" "LFLAGS+=-m32"

3.1.2.3. Installation for Testing Pure Qt 4 Applications

Testing a Qt 4.x application that does not use the Qt 3.x support functionality (i.e., a “pure” Qt 4.x application), requires us to do a split build of Squish. (This is necessary because Squish itself uses the Qt 3 compatibility so that it can test both Qt 3 and Qt 4 applications.)

A split build means that you must compile the components that come in direct contact with the AUT using your pure Qt 4.x library. The rest of Squish can be compiled with either Qt 3 or with a Qt 4 installation that includes the Qt3Support module.

Performing a split build requires you to run both configure and build twice: the first time to build the parts that will use the pure Qt 4 library and the second time to build the parts that require Qt 3, or Qt 4 with Qt3Support.

Here is a very basic example that assumes Squish has been unpacked twice, each time into a different directory. One directory will be used for the pure Qt 4 parts, and the other will be used for the Qt 4 with Qt3Support (or just Qt 3 if preferred) parts. For Unix-like systems, we have assumed a username of “user” which must be changed to your actual username.

[Note]Using Qt 4 Debug Libraries

If you build your application using the Qt 4 debug libraries then you will need to use those same libraries when building Squish.

If you want to be able to test both release and debug versions of your application you will need two versions of Squish: one built against the normal Qt 4 libraries, and the other built against the Qt 4 debug libraries, so you will need to do two separate builds. For example, on Windows for the normal Qt 4 libraries, you might use directories:

C:\Squish-Qt4

C:\Squish-Qt4-and-Qt3

C:\Qt\4.7.1

C:\Qt\Qt4-and-Qt3

And for the Qt 4 debug libraries, you might use directories:

C:\Squish-Qt4-debug

C:\Squish-Qt4-and-Qt3-debug

C:\Qt\4.7.1-debug

C:\Qt\Qt4-and-Qt3-debug

Those using Unix-like systems and macOS would need to use similar directory layouts adapted to their filesystems.

Step 1 of 6

First unpack the Squish tools source package, then rename its directory (e.g., to C:\Squish-Qt4). Then unpack the Squish source tools package a second time, and again rename its directory (e.g., to C:\Squish-Qt4-and-Qt3).

Windows

C:\Squish-Qt4

C:\Squish-Qt4-and-Qt3

Linux/Unix

/home/user/squish-qt4

/home/user/squish-qt4-and-qt3

macOS

/Users/user/squish-qt4

/Users/user/squish-qt4-and-qt3

For the purposes of this example, we have assumed that the pure Qt 4 (used by your AUTs) and the Qt 4 with Qt3Support (needed to build many of Squish's components) are installed in the directories listed below. The directory names don't matter—all that matters is that you have a pure Qt 4 installation in one directory, and a Qt 4 with Qt3Support (or Qt 3) installation in a separate directory.

Windows

C:\Qt\4.7.1

C:\Qt\Qt4-and-Qt3

Linux/Unix

/usr/local/qt47

/usr/local/qt4-and-qt3

macOS

/opt/local/qt47

/opt/local/qt4-and-qt3

Step 2 of 6

Next, we build those parts that only require a pure Qt 4 installation—the IDL compiler, the Qt wrappers, and the examples. These are all built using the pure Qt 4 library:

Windows

C:\> cd C:\Squish-Qt4

C:\Squish-Qt4> configure --enable-pure-qt4 --with-qtdir=C:\Qt\4.7.1 --disable-all --enable-idl --enable-wrappers --enable-examples

Linux/Unix

$ cd /home/user/squish-qt4

$ ./configure --enable-pure-qt4 --with-qtdir=/usr/local/qt47 --disable-all --enable-idl --enable-wrappers --enable-examples

macOS

$ cd /Users/user/squish-qt4

$ ./configure --enable-pure-qt4 --with-qtdir=/opt/local/qt47 --disable-all --enable-idl --enable-wrappers --enable-examples

Once configure has finished, it is wise to verify that the configuration log output includes the line Checking Qt version ...... 4.x where x is the Qt 4 release you are using.

Step 3 of 6

Now build the wrappers and the examples using the pure Qt 4 installation:

Windows

C:\Squish-Qt4> build

Linux/Unix/macOS

$ ./build

Step 4 of 6

Now change to the directory of the second Squish installation, and make configure use the Qt 4 with Qt3Support (or Qt 3) installation, and select the remaining components to be configured and built:

Windows

C:\Squish-Qt-4> cd C:\Squish-Qt4-and-Qt3

C:\Squish-Qt4-and-Qt3> configure --with-qtdir=c:\Qt\Qt4-and-Qt3 --disable-idl --disable-wrappers --disable-examples --disable-explorer

Linux/Unix

$ cd /home/user/squish-qt4-and-qt3

$ ./configure --with-qtdir=/usr/local/qt4-and-qt3 --disable-idl --disable-wrappers --disable-examples --disable-explorer

macOS

$ cd /Users/user/squish-qt4-and-qt3

$ ./configure --with-qtdir=/opt/local/qt4-and-qt3 --disable-idl --disable-wrappers --disable-examples --disable-explorer

Step 5 of 6

Now that the rest of the components are configured, we can build them:

Windows

C:\Squish-Qt4-and-Qt3> build

Linux/Unix/macOS

$ ./build

If you want to, you could even perform the above steps on different machines, if you prefer to execute the tests remotely.

Step 6 of 6

The last step necessary to complete the split build is to copy over the required files which were built in the pure Qt 4 directory over to your Qt 4 with Qt3Support (or Qt 3) build directory:

Windows

C:\Squish-Qt4-and-Qt3> copy C:\Squish-Qt4\bin\dllpreload.exe bin\

C:\Squish-Qt4-and-Qt3> copy C:\Squish-Qt4\bin\extrawindowwatcher.exe bin\

C:\Squish-Qt4-and-Qt3> copy C:\Squish-Qt4\bin\injectdll*.exe bin\

C:\Squish-Qt4-and-Qt3> copy C:\Squish-Qt4\bin\squishhook.dll bin\

C:\Squish-Qt4-and-Qt3> copy C:\Squish-Qt4\bin\squishqtwrapper.dll bin\

C:\Squish-Qt4-and-Qt3> copy C:\Squish-Qt4\bin\startaut.exe bin\

C:\Squish-Qt4-and-Qt3> copy C:\Squish-Qt4\bin\startwinaut.exe bin\

C:\Squish-Qt4-and-Qt3> copy C:\Squish-Qt4\bin\winhook.dll bin\

C:\Squish-Qt4-and-Qt3> copy C:\Squish-Qt4\lib\_extrawindowwatcher.exe lib\

C:\Squish-Qt4-and-Qt3> copy C:\Squish-Qt4\lib\_startwinaut.exe lib\

C:\Squish-Qt4-and-Qt3> copy C:\Squish-Qt4\lib\extensions\qt\*.* lib\extensions\qt\

C:\Squish-Qt4-and-Qt3> copy C:\Squish-Qt4\lib\extensions\win\*.* lib\extensions\win\

C:\Squish-Qt4-and-Qt3> copy C:\Squish-Qt4\lib\squishqtpre.dll lib\

C:\Squish-Qt4-and-Qt3> copy C:\Squish-Qt4\src\wrappers\qt\*.tcl lib\

Linux/Unix

$ cp /home/user/squish-qt4/bin/isstaticapp /home/user/squish-qt4-and-qt3/bin

$ cp /home/user/squish-qt4/bin/startaut /home/user/squish-qt4-and-qt3/bin

$ cp /home/user/squish-qt4/lib/extensions/qt/*.* /home/user/squish-qt4-and-qt3/lib/extensions/qt

$ cp /home/user/squish-qt4/lib/libsquishhook.so /home/user/squish-qt4-and-qt3/lib

$ cp /home/user/squish-qt4/lib/libsquishqtpre.so /home/user/squish-qt4-and-qt3/lib

$ cp /home/user/squish-qt4/lib/libsquishqtwrapper.so /home/user/squish-qt4-and-qt3/lib

$ cp /home/user/squish-qt4/src/wrappers/qt/*.tcl /home/user/squish-qt4-and-qt3/lib

macOS

$ cp /Users/user/squish-qt4/bin/isstaticapp /Users/user/squish-qt4-and-qt3/bin

$ cp /Users/user/squish-qt4/bin/startaut /Users/user/squish-qt4-and-qt3/bin

$ cp /Users/user/squish-qt4/lib/extensions/qt/*.* /Users/user/squish-qt4-and-qt3/lib/extensions/qt

$ cp /Users/user/squish-qt4/lib/libsquishhook.so /Users/user/squish-qt4-and-qt3/lib

$ cp /Users/user/squish-qt4/lib/libsquishqtpre.so /Users/user/squish-qt4-and-qt3/lib

$ cp /Users/user/squish-qt4/lib/libsquishqtwrapper.so /Users/user/squish-qt4-and-qt3/lib

$ cp /Users/user/squish-qt4/src/wrappers/qt/*.tcl /Users/user/squish-qt4-and-qt3/lib

Now, the build in your Qt 4 with Qt3Support directory (or Qt 3 directory) is fully usable for creating and running tests for applications that link against a pure Qt 4.x library.

3.1.2.4. Installation for Testing Qt 3.x Applications

To test applications that are built against Qt 3.1 or later it is possible to use a suitable Squish binary package matching your Qt version, or if one isn't available, to do a standard build. This means that as long as you are using Qt 3.1 or later you can just build Squish normally using the Quick Install (Section 3.1.2.1) procedure.

Testing a Qt 3.0 application requires a split build of Squish—but this is not necessary for Qt 3.1 or later for which the standard build works fine. But for Qt 3.0 only, you must compile the components that come in direct contact with the AUT using the same Qt 3 library you use to build the AUT. The rest of Squish must be compiled with a separate version of the Qt library, either Qt 4 with the Qt3Support module (or with Qt 3.1 or later).

A split build means that you must compile the components that come in direct contact with the AUT using your Qt 3.0 library. The rest of Squish can be compiled with either Qt 3 or with a Qt 4 installation that includes the Qt3Support module.

Performing a split build requires you to run both configure and build twice: the first time to build the parts that will use the Qt 3 library that your AUT uses, and the second time to build the parts of Squish that require Qt 4 with Qt3Support (or Qt 3.1 or later).

Here is a very basic example that assumes that the Squish tools package has been unpacked twice, each time into a different directory. One directory will be used for the Qt 3 parts, and the other will be used for the Qt 4 with Qt3Support (or just Qt 3.1 if preferred) parts. For Unix-like systems, we have assumed a username of “user” which must be changed to your actual username. We have assumed that the Squish tools package has been unpacked twice, and each time had its directory renamed so that you now have two identical Squish directories with the following names:

Windows

C:\Squish-Qt3

C:\Squish-Qt4-and-Qt3

Linux/Unix

/home/user/squish-qt3

/home/user/squish-qt4-and-qt3

macOS

/Users/user/squish-qt3

/Users/user/squish-qt4-and-qt3

We also assume that Qt 3 and Qt 4 with Qt 3 support are installed in the directories listed below. (Naturally, it doesn't matter what directories are used, so long as you adapt the instructions to match.)

Windows

C:\Qt\3.2.3

C:\Qt\4.7.1

Linux/Unix

/usr/local/qt3

/usr/local/qt4

macOS

/opt/local/qt3

/opt/local/qt4

First, build just the server, IDL compiler, the Qt wrappers, and the examples, using Qt 3:

Windows

C:\> cd C:\Squish-Qt3

C:\Squish-Qt3> configure --with-qtdir=c:\Qt\3.2.3 --disable-all --enable-server --enable-idl --enable-wrappers --enable-examples

Linux/Unix

$ cd /home/user/squish-qt3

$ ./configure --with-qtdir=/usr/local/qt3 --disable-all --enable-server --enable-idl --enable-wrappers --enable-examples

macOS

$ cd /Users/user/squish-qt3

$ ./configure --with-qtdir=/opt/local/qt3 --disable-all --enable-server --enable-idl --enable-wrappers --enable-examples

Once configure has finished, it is wise to verify that the configuration log output includes the line Checking Qt version ...... 3.x where x is the Qt 3 release you are using. Now build the wrappers and the examples using the Qt 3 installation:

Windows

C:\Squish-Qt3> build

Linux/Unix/macOS

$ ./build

Now change to the directory of the second Squish installation, and make configure use the Qt 4 with Qt3Support (or Qt 3.1 or later) installation, and select the remaining components to be configured and built:

Windows

C:\Squish-Qt3> cd C:\Squish-Qt4-and-Qt3

C:\Squish-Qt4-and-Qt3> configure --with-qtdir=c:\Qt\4.7.1 --disable-server --disable-idl --disable-wrappers --disable-examples

Linux/Unix

$ cd /home/user/squish-qt4-and-qt3

$ ./configure --with-qtdir=/usr/local/qt4 --disable-server --disable-idl --disable-wrappers --disable-examples

macOS

$ cd /Users/user/squish-qt4-and-qt3

$ ./configure --with-qtdir=/opt/local/qt4 --disable-server --disable-idl --disable-wrappers --disable-examples

Now that the rest of the components are configured, we can now build them:

Windows

C:\Squish-Qt4-and-Qt3> build

Linux/Unix/macOS

$ ./build

If you want to, you could even perform the above steps on different machines, if you prefer to execute the tests remotely.

Usage Example

Here is a very brief summary of an example usage of this setup on a Unix system. Apart from the different path names, the approach is the same on Windows. We will assume an AUT with the path /opt/ourcompany/ourapp.

/home/user/squish-qt3/bin/squishserver &
/home/user/squish-qt3/bin/squishserver --config addAppPath /opt/ourcompany

At this point you could verify that the application will indeed be found in the given path:

/home/user/squish-qt4-and-qt3/bin/squishrunner --info applications

The name of your application should be printed out—possibly along with the names of any other applications that you have registered with Squish.

Now run the IDE (assuming that you have installed it; see Standalone Installation of the IDE (Section 3.2)):

/home/user/squishide/squishide

This will automatically start and stop a local squishserver as needed. (This behavior is controlled by the Remote Testing setting. To change it click Preferences, then click the Squish item's triangle to expand it, and then this item's Remote Testing item to show the Remote Testing pane. The Start local Squish server automatically checkbox should be checked.)

All that's left, before you can start creating new test cases, is the creation of a new test suite and the selection of ourapp in the suite's settings dialog.

3.1.2.5. Installation for testing with a single-threaded Qt library

The easiest approach is to link the AUT and all of Squish to the same Qt library. If it is possible to link your AUT to a shared, multi-threaded Qt library, we recommend using this for both Squish and your AUT. Any other Qt configuration settings, (STL, etc.) don't matter.

If you don't want to use a multi-threaded Qt library for your AUT, you can use one Qt library for your AUT and a different one for Squish (some parts of Squish, mainly the squishserver and the squishrunner, require a multi-threaded Qt library).

However, the parts of Squish that hook into your AUT (Squish's qtwrapper, hook, and object model libraries), must be built against exactly the same Qt library as your AUT. Also make sure that the same C++ compiler is used. The other Squish tools can be linked with any Qt library.

So in order to support a single-threaded Qt library, you must perform a split build of Squish, i.e., build some parts against a multi-threaded Qt library and some parts against the single-threaded Qt library that your AUT uses.

[Note]Windows-specific

If you want to use a single-threaded Qt library on Windows, please take a look at Q: 10.1.6.

For example, suppose that the single- and multi-threaded Qt libraries are in the following locations:

Windows

C:\Qt\singlethreaded

C:\Qt\multithreaded

Linux/Unix

/usr/local/qt-singlethreaded

/usr/local/qt-multithreaded

macOS

/opt/local/qt-singlethreaded

/opt/local/qt-multithreaded

The first step is to compile only the multi-threaded parts of Squish by running configure, and disabling everything except for the server and runner:

Windows

C:\squish> configure --with-qtdir=C:\Qt\multithreaded --disable-all --enable-server --enable-runner --enable-ide-utils

C:\squish> build

Linux/Unix

$ ./configure --with-qtdir=/usr/local/qt-multithreaded --disable-all --enable-server --enable-runner --enable-ide-utils

$ ./build

macOS

$ ./configure --with-qtdir=/opt/local/qt-multithreaded --disable-all --enable-server --enable-runner --enable-ide-utils

$ ./build

The second step is to compile the remaining parts of Squish with the single-threaded Qt by running configure again, this time disabling only the server and the runner:

Windows

C:\squish> configure --with-qtdir=C:\Qt\singlethreaded --disable-server --disable-runner --disable-ide-utils --disable-win

C:\squish> build

Linux/Unix

$ ./configure --with-qtdir=/usr/local/qt-singlethreaded --disable-server --disable-runner --disable-ide-utils

$ ./build

macOS

$ ./configure --with-qtdir=/opt/local/qt-singlethreaded --disable-server --disable-runner --disable-ide-utils

$ ./build

Make sure that the AUT is linked against exactly the same single-threaded Qt library as you have used for building the single-threaded parts of Squish. If in doubt, use one of the following tools to verify the correct linkage:

Windows

Dependency Walker (depends.exe)

Linux/Unix

ldd or chatr

macOS

otool

3.1.2.6. Statically linked Qt libraries

We recommend using a dynamic (shared) Qt library for both recording and running tests. Running tests using a static Qt library used to work with old versions of Qt on some Unix variants, but is not supported for technical reasons anymore.

3.1.2.7. Installation for testing with a renamed Qt library

3.1.2.7.1. Qt 3

If you want to use Squish with a renamed Qt 3 library, you must use additional options to configure. On Unix and macOS you must use the -with-qtlibname=<renamed Qt library>.

On Windows, you must specify three options (you must specify all three options, even if one of the libraries is not renamed; in which case, just specify the original version):

  • --with-qtdllname=<path to Qt>/bin/<renamedqt-mt.dll>

  • --with-qtlibname=<path to Qt>/lib/<renamedqt-mt.lib>

  • --with-qtmainlibname=<path to Qt>/lib/<qtmain.lib>

With the option --with-qtdllname you must specify the path to the renamed Qt DLL, with --with-qtlibname you must specify the path to the renamed Qt import library, and with the option --with-qtmainlibname you must specify the path to the renamed qtmain.lib library.

The renamed Qt DLL and import library should contain the characters mt if you have a multi-threaded Qt library. configure uses this to detect if the Qt library is mult-threaded or single-threaded. If you don't follow this convention, the automatic detection fails and some parts of Squish are incorrectly disabled.

3.1.2.7.2. Qt 4 or later

If you want to use Squish with a renamed Qt library, you must use an additional option to configure: if you configured your Qt library with the option -qtlibinfix <infix>, you must configure Squish with the option --with-qtlibinfix=<infix>.

3.1.2.8. Solving Build Errors

Missing prerequisites, incompatible system libraries or misconfigured development tools may lead to the build process failing.

We have started to list most commonly reported build errors and solutions in the Knowledge Base. For errors not covered please file a technical support request including the error output and configuration files like config.log and Build.conf.

We'll help solving obvious problems through our standard support offering. For more involved cases including remote or on-device debugging, tool chain setups or code adaptions we provide a Customization Service. Case-specific conditions are available upon request.

3.1.3. Installing Squish for Qt from Embedded Source Packages

Customers targetting an embedded device, i.e. a platform other than their local system are offered a source package featuring the capability to cross-compile a minimal set of Squish components for QNX, Android, VxWorks, Embedded Linux, etc. running on ARM, MIPS, PPC and other hardware architectures.

As Qt installations on embedded systems often use non-standard configurations or non-standard library names or locations froglogic engineers will help with adaptions to the configuration of Squish. See the description of this customization service for more details.

The file name of the source package suitable for compilation to target system will follow this naming scheme: squish-x.y.z-qt-embedded-src.zip

First, a standard Squish for Qt desktop package needs to be installed. This provides the Squish IDE as well as squishrunner. Ideally, this package targets the same major Qt version as the embedded build generated below.

Second, the Squish components which will run on the embedded device will need to be compiled from a special Squish/Qt embedded source package, e.g. squish-6.1.0-qt-embedded-src.tar.gz. The source files will be cross-compiled for the target system.

It it assumed that the Squish source package has been unpacked into the directory /home/user/squish-src. It is also assumed that your Qt installation is found in the directory /usr/local/qt.

  1. Start by creating a build directory for Squish, which should be different than the Squish source directory.

    $ mkdir /home/user/squish-build
    $ cd /home/user/squish-build
    

  2. Now, prepare the Squish build by running the configure script. In the simplest case, this is a matter of running a single command.

    $ /home/user/squish-src/configure --with-qmake=/usr/local/qt/bin/qmake --enable-qmake-config --with-squishidl=<path-to-squish-desktop-package>/bin/squishidl --disable-all --enable-qt --enable-server
    

    However, when building for the device needs to be done in a special environment (e.g. for OpenEmbedded or QNX) or when qmake lacks a configuration for the cross-compiling environment then it may be needed to tell the Squish build system about which compiler and which additional flags to use for the target system. For this purpose, any of the following variables can be passed to configure:

    • CXX=<Name or path to target C++ compiler>

    • CXXFLAGS=<Initial arguments for target C++ compiler>

    • LFLAGS=<Initial arguments for target linker>

    In this case, the command sequence is a bit different and the configure script is not called with the --enable-qmake-config switch:

    $ /home/user/squish-src/configure "CXX=<your-target-c++-compiler>" --with-qmake=/usr/local/qt/bin/qmake --with-squishidl=<path-to-squish-desktop-package>/bin/squishidl --disable-all --enable-qt --enable-server
    
  3. After the configure run has finished, the build process can be started:

    $ ./build
    
  4. Finally, to copy as little as possible to the target device, all needed Squish files can be installed into a separate directory. This directory can then be copied over to the target device:

    $ ./build install DESTDIR=<path-to-squish-distribution-directory>
    

3.1.4. Installing Squish for Qt for iOS testing

The Squish for Qt for iOS testing package is suitable for building the iOS application for testing. You still need a Squish package for actually recording, managing and running the tests. Please see Installing from Binary Packages (Section 3.1.1) for details on installing such a package.

In order to build your application instrumented for using with Squish on iOS, you have to unpack the package and do a build of your application with Squish's wrapper included in the build. To include it, modify your applications main.cpp and .pro as follows:

  1. Add

    #ifdef HAVE_SQUISH
    #  include <qtbuiltinhook.h>
    #endif
    

    to your includes in the file with your main function (typically main.cpp).

    In the same file add

    #ifdef HAVE_SQUISH
        Squish::allowAttaching(11233);
    #endif
    

    after the QApplication constructor but before you enter the event loop.

    So a typical main() function might look like:

    #include "mainwindow.h"
    #include <QApplication>
    #ifdef HAVE_SQUISH
    #  include <qtbuiltinhook.h>
    #endif
    
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
    #ifdef HAVE_SQUISH
        Squish::allowAttaching(11233);
    #endif
        MainWindow w;
        w.show();
    
        return a.exec();
    }
    

  2. Add

    include(<path-to-squish>/qtbuiltinhook.pri)
    

    to your .pro file (replace <path-to-squish> with the full path to the location where you unpacked Squish for Qt on iOS).

  3. Now you can register an attachable application in Squish (with the IP address of the device and the port number 11233) and attach to it from a Squish running on the desktop. If you use a different port number in the Squish::allowAttaching() call, you need to register the app with a different port number. See also Attaching to a Running Application with the Built-in Hook (Section 7.13.2.3) for more details on attachable applications.

If you want to use Squish's Qt wrapper extensions, you have to set the SQUISH_WRAPPER_EXTENSIONS variable before you include the qtbuiltinhook.pri in your .pro file.

Examples:

  • If your application uses Qt Quick 1, you should add Squish's declarative extension like:

    SQUISH_WRAPPER_EXTENSIONS = squishdeclarative
    include(<path-to-squish>/qtbuiltinhook.pri)
    

  • If your application uses Qt Quick 2, you should add Squish's Qt Quick extension like:

    SQUISH_WRAPPER_EXTENSIONS = squishqtquick squishqtquicktypes
    include(<path-to-squish>/qtbuiltinhook.pri)
    

3.1.5. Installing Squish for Qt for Android testing

The Squish for Qt for Android testing package is suitable for preparing a Qt on Android application for testing. You also need a Squish for Qt package on your desktop machine for recording, managing and replaying tests. Please see Installing from Binary Packages (Section 3.1.1) for details on installing such a package.

In order to build your application instrumented for using with Squish for Qt on Android, you have to unpack the package and do a build of your application with Squish's Qt support included in the build, followed by deploying the application:

  1. Add the following to your applications qmake project file:

    SQUISH_ATTACH_PORT = <portnumber>
    include(</path-to-squish>/qtbuiltinhook.pri)
    

    <path-to-squish> has to be replaced with the full path to the location where you unpacked Squish for Qt for Android.

    <portnumber> has to be replaced by a freely choosen TCP port number that is greater than 1024. It will be used to attach to the application.

  2. Ensure your project is deployed with Qt libraries as part of your APK. Using the Ministro service to install Qt is unlikely to work. This setting can be found in Qt Creator in Projects, Build, Build Steps, Build Android APK. Outside of Qt Creator this can be configured via a commandline argument of androiddeployqt (see also http://doc.qt.io/qt-5/deployment-android.html).

  3. In Qt Creator choose Clean, to ensure that qmake picks up all parts of Squish for Qt to include them in the final application package. Afterwards choose Run or Debug to build, deploy and run the application on the device.

  4. The application should be running on the Android device now. The Application Output in Qt Creator should (among other log output) show several lines starting with the word Squish, including Squish: Listening on port 4567 for incoming connections where 4567 is the port number specified earlier in the qmake project file.

  5. If the application is running inside the Android Emulator or if testing over a USB connection is required, the TCP port will need to be forwarded to the desktop machine in order to attach to the AUT. To do that, call the following from a commandline prompt on the desktop machine:

    $ adb forward tcp:<portnumber> tcp:<portnumber>
    

    Again replace <portnumber> with the one set in the qmake project file. The adb commandline tool is part of Android Studio.

  6. If not done already, install a Squish for Qt binary package on the desktop machine. For remote testing Qt on Android the Qt version and compiler version of this package do not matter.

  7. In squishide choose File, New Test Suite... to create a new Test Suite and follow the wizard. When asked for the GUI Toolkit choose Qt. When asked for the Application Under Test choose <No Application>.

  8. Follow the steps from Register the Attachable AUT (Section 7.8.3) to register the application as an attachable AUT. In case TCP port forwarding via ADB is used, the Host will be localhost.

To verify if the AUT is accepting incoming connections the output of netstat can be used (for a Windows command prompt replace grep with findstr)

$ adb shell netstat -a | grep <portnumber>
 tcp       0      0 0.0.0.0:<portnumber>   0.0.0.0:*        LISTEN

Attaching to the running AUT will work if an entry with state LISTEN and the previously passed portnumber is present in the tabular output.

3.1.6. Distributing and Sharing an Installation

Rationale

Once you have completed the build steps described in the previous section you have a system ready to use on the local machine. You may repeat these steps for licensed users on as many machines as you like. (Squish is normally licensed per user rather than per machine, so one licensee can install Squish on all the machines they use.)

This section is for users or system administrators that wish to distribute or share a build performed on one machine to a different location or for users on other machines. If access to a local installation is all you need, you can safely skip the rest of this section and proceed to the Standalone Installation of the IDE (Section 3.2) section, and then to the chapters about using Squish, starting with Squish Concepts (Section 4.1.1.1) if you are new to Squish.

There are many reasons why you might want to reuse the built executables and libraries—for example:

  • Division of labor between developers or system administrators (who will build Squish) and testers (who will use Squish).

  • Separation between machines used for product development and machines used specifically for testing.

  • Reduced maintenance work required when upgrading the software.

  • Saving time by doing a single compilation and distributing the results.

  • Saving disk space since only the executables and their supporting libraries need to be distributed, not the entire source code.

Distributables

After completing the build, the distributables can be found in the top-level bin, lib, and etc directories. The bin directory contains the executables (and some supporting .dll files on Windows), while other supporting libraries and script files are in the lib directory. The etc directory is used to hold installation configuration files—user specific settings are stored elsewhere, as explained shortly. Here is the list of all the files that comprise the Squish toolset (including those needed by the IDE). We have used wildcard syntax to indicate multiple files where appropriate.

Windows

bin\*.*

lib\*.*

etc\paths.ini

etc\squish.ini

etc\*wrapper_descriptors.xml

Linux/Unix/macOS

bin/*

lib/*

etc/paths.ini

etc/squish.ini

etc/*wrapper_descriptors.xml

Notice that the wrapper library and wrapper descriptors have been specified using a wildcard (*) because there may be several of these depending on the toolkits you built Squish to make use of (e.g., Qt, Java, etc.).

Distribution

To distribute the build to another location on the same machine, or on a different one, just copy over all the files (or only those in the groups required), from the three directories listed above. The original build path is hard-coded into the binaries, but they will still work in a different location. To enable the executables to locate the libraries and other files that they depend on, it is important that the relative positions of the files remains the same. This means that you can copy the files from the bin, lib, and etc directories, to whatever directories you want, providing that the relative paths between the files remain the same, i.e., the directories used to store the files must have the same parent directory.

For example, if you copied the bin directory's files to the directory C:\tools\squish\executable, then the companion files from the lib, and etc directories must go in directories under C:\tools\squish, such as C:\tools\squish\library and C:\tools\squish\configuration.

Shared Installation

To allow all licensed users to access Squish from a shared network location, make the bin, lib, and etc directories accessible to them. This can be done via a share on Windows or via an NFS mount on Unix, for example. As mentioned earlier, the bin, lib and etc directories must all share the same parent directory.

User-specific settings are stored locally on a per-user basis in the application data directory on Windows (%APPDATA%\froglogic\Squish), or the $HOME/.squish directory on Unix and macOS.

3.1.7. Installing Squish for Web

This section covers the necessary installation steps for different browsers and automation methods when using Squish for Web. Each subsection targets one browser or browser type and may be further divided in multiple parts.

3.1.7.1. Supported browsers

Squish for Web supports a wide range of different browsers and browser versions. The following table attempts to provide an overview of the browsers and browser versions being supported. More detailed information for each browser can be found in the following sections

Table 3.2. Supported Browsers

BrowserVersionOperating SystemAttach to Running Instances
Mozilla Firefoxsince 12Linux, macOS, Windowsyes
Google Chrome/Chromiumsince 40Linux, macOS, Windowsyes
Microsoft Internet Explorer9 to 11Windowsyes
Microsoft Edgesince 38Windowsno
Apple Safarisince 9 up to 11macOSyes
Applications based on Chromiumsince 40Linux, macOS, Windowsyes
Opera11 to 12Windows, Linuxno
Browsers on mobile devicesalliOS, Androidno


3.1.7.2. Mozilla Firefox

You can execute, record and inspect web applications running in Firefox by selecting it the Server Settings dialog in the Squish IDE. Open the dialog using Edit|Server Settings and then select the Browser page. In the dropdown on the right select Firefox. The Executable field allows you to specify the firefox executable if it is not found automatically by Squish.

Squish for Web needs to install an extension for Firefox to be able to automate the browser. The installation of the extension is automatically started from the IDE but it needs to be completed manually by accepting the extension and closing the browser. The extension installation process can be started at any time from the Server Settings dialog, but it is being started as well when the Squish IDE detects a missing or too old extension version. You can start the extension installation process manually from a terminal by issuing the following command after changing to the Squish installation directory:

lib/exec/browserextensionhelper installBrowserExtension firefox

Squish for Web uses a separate profile folder to separate passwords and other browser data between the automation session and your normal usage of the browser. The profile is being stored in a folder named squish_firefox_profile_dir in the directory $HOME/.squish on Linux and macOS and %APPDATA%\froglogic\Squish\ on Windows. The folder will be created by Firefox the first time Squish starts the browser.

3.1.7.2.1. Setup for attaching to running instances
[Note]Note

You only need to follow these instructions when you want to use the attachToBrowser function. The following instructions are only needed if you plan to automate a Firefox process that is being started by some other program and not directly by Squish for Web.

In order to automate Firefox you need to make sure the Squish Firefox Extension is installed in the user profile used by Firefox when it is started outside of Squish. The easiest way to install the extension is to open a file browser and navigate to your Squish for Web package. From there go into the lib subfolder in the package. If you use Firefox 57 or a newer version drag and drop the file squishWebExt@froglogic.com.xpi into the Firefox browser window and acknowledge the installation. If you use a Firefox version older than 57 you'll need to drag and drop the file squish@froglogic.com.xpi into the Firefox browser window and acknowledge the installation by restarting Firefox.

The Squish Firefox Extension by default uses the port 9932 for communication with the rest of Squish for Web. If this port is already used by some other program on your system you can configure the extension to use a different port. In order to do this just open the Firefox menu, click on the Tools entry and in the submenu click on Addons item. This opens a new tab with the extensions loaded by Firefox, make sure the Addons entry on the left of the page is selected. You should see the Squish Firefox Extension there and below it a button labeled Options or Preferences depending on your system. If you click that button a new popup window appears where you can change the port number. This port number should then be passed to the attachToBrowser function to attach to this instance of Firefox.

Usually Firefox will delay WebSocket connection attempts to a given WebSocket server for some time if the last attempt failed. This is a problem when wanting to attach to the browser from Squish as the Extension will repeatedly try to connect to Squish, but this connection will fail as long as there is no Squish test script executed with the attachToBrowser function. Hence after a while these connection attempts will be delayed by Firefox and eventually the delay will be longer than the AUT timeout configured in Squish which will cause the connection to fail to be established.

This behavior of Firefox can be disabled by opening the special about:config URL in a new browser tab. Please acknowledge the warning by clicking the I'll be careful, I promise button. The setting to change is network.websocket.delay-failed-reconnects and it should be set to false. You can search for the setting by typing the name into the search field and changing the setting can be done with a simple double click of the mouse on the value.

3.1.7.3. Google Chrome/Chromium

You can execute, record and inspect web applications running in Google Chrome/Chromium by selecting it the Server Settings dialog in the Squish IDE. Open the dialog using Edit|Server Settings and then select the Browser page. In the dropdown on the right select Google Chrome. The Executable field allows you to specify the executable if it is not found automatically by Squish.

Squish for Web needs to install an extension for Google Chrome/Chromium to be able to automate the browser. The installation of the extension is automatically started from the IDE but it needs to be completed manually by accepting the extension and closing the browser. The extension installation process can be started at any time from the Server Settings dialog, but it is being started as well when the Squish IDE detects a missing or too old extension version. You can start the extension installation process manually from a terminal by issuing the following command after changing to the Squish installation directory:

lib/exec/browserextensionhelper installBrowserExtension google-chrome

In order to automate Google Chrome/Chromium Squish for Web needs to install an extension for Google Chrome/Chromium. The installation of the extension is automatically started from the IDE when you try to run a test against Google Chrome/Chromium or start the browser using the Launch AUT button. The https://chrome.google.com/webstore/detail/mkfebldlkodkmhpdlgigfneaajboegdlfroglogic Squish Chrome extension is distributed through the Chrome Web Store

Squish for Web uses a separate profile folder to separate passwords and other browser data between the automation session and your normal usage of the browser. The profile is being stored in a folder named squish_chrome_data_dir in the directory $HOME/.squish on Linux and macOS and %APPDATA%\froglogic\Squish\ on Windows. The folder will be created by Google Chrome/Chromium the first time Squish starts the browser.

3.1.7.3.1. Setup for attaching to running instances
[Note]Note

You only need to follow these instructions when you want to use the attachToBrowser function. The following instructions are only needed if you plan to automate a Chrome process that is being started by some other program and not directly by Squish for Web.

In order to automate Google Chrome you need to make sure the froglogic Squish Intergration is loaded in the user profile used by Google Chrome when it is started outside of Squish. The easiest way to make Chrome use the extension is to start the browser and navigate to the Chrome store page for the Squish Integration: https://chrome.google.com/webstore/detail/mkfebldlkodkmhpdlgigfneaajboegdl. Once the page has loaded click the "Add To Chrome" button and on the popup that is being opened up acknowledge the installation. You can verify that loading the extension succeeded by opening the Chrome menu and then selecting Tools and then Extensions entry. This opens up a new tab with the list of extensions, you should see an entry for froglogic Squish Integration in that list.

The froglogic Squish Integration by default uses the port 9935 for communication with the rest of Squish for Web. If this port is already used by some other program on your system you can configure the extension to use a different port. In order to do this open the Chrome menu and then click on Tools and in the opened submenu click on Extensions. This opens a new tab with the Extensions loaded in Chrome. Below the entry for the froglogic Squish Integration you see a link labeled Options. If you click that link a new popup window appears where you can change the port number and save the change. This port number should then be passed to the attachToBrowser function to attach to this instance of Google Chrome.

3.1.7.4. Microsoft Internet Explorer

You can execute, record and inspect web applications running in Internet Explorer by selecting it the Server Settings dialog in the Squish IDE. Open the dialog using Edit|Server Settings and then select the Browser page. In the dropdown on the right select Internet Explorer.

Squish does not require any special setup steps to be able to automate Internet Explorer, all necessary setup is being done automatically when you start the browser the first time.

3.1.7.4.1. Setup to attach to running instances
[Note]Note

You only need to follow these instructions when you want to use the attachToBrowser function. The following instructions are only needed if you plan to automate an Internet Explorer window that is being started by some other program and not directly by Squish for Web.

In order to automate Internet Explorer using Squish for Web it is necessary to instruct it to use just a single process for all its tabs. Internet Explorer 10 and newer will usually use multiple processes for rendering websites as can be seen in the task manager.

Internet Explorer can be instructed to use only one process by changing a registry setting using the registry editor. The editor can be started by opening the Windows menu and then start typing regedit and select the entry running the regedit command.

The registry editor shows a tree on the left, locate the entry HKEY_CURRENT_USER and expand it. Following the tree structure expand the Software entry, below that Microsoft and finally inside Microsoft expand Internet Explorer. In this section there's an entry called Main and once it is selected you see a couple of keys on the right side of the editor. There should be a DWORD entry called TabProcGrowth there. The TabProcGrowth entry has to be set to 0 in order for Squish for Web to be able to automate Internet Explorer after attaching to it. Once this is done make sure to restart any running instances of the browser.

3.1.7.5. Microsoft® Edge on Windows 10

Microsoft® Edge support on Windows 10 is realized through the Webdriver for Edge. The Webdriver is not redistributed with squish so you have to download it from Microsoft®. Download Microsoft® Edge Webdriver

When using the Webdriver implementation Squish does not start the browser itself but the Webdriver. Since the Webdriver executable can be located anywhere on the system you need to specify the path to the Webdriver. If you're using the IDE you can simply use the Browser-Executable field in the Server Settings Dialog under Edit|Server Settings|Browser and Microsoft Edge. In case you do not use the IDE you can set the environment variable SQUISH_BROWSERPATH to point to the Webdriver-Executable.

3.1.7.5.1. Known issues when using Squish with Microsoft® Edge

Microsoft® Edge support is still in an early stage so there are some known issues.

  • Switching to Fullscreen mode is not supported.

  • Tab support is limited to playback. While recording only a single tab is supported. If you try to open multiple tabs or try to switch between tabs during recording the focus will always go back to the initial tab.

  • automateLogin is not supported. In general websites with native login dialogs are not supported.

  • When you start recording the browser window is sometimes opened before the initialization is complete, which might lead to events not being recorded. Make sure the Squish recording Control Bar is opened.

  • When a new page is loaded there might be up to a 100ms gap in which no events are recorded by Squish.

  • When a new page is loaded that has a different origin or domain it's possible that events recorded directly before the page change happens are lost.

  • Drag and Drop on HTML input fields does not work reliably. As a workaround you can either drop the item with the relative x drop location set to 1. Or call mouseMove between the drag and drop calls (the mouseMove coordinates should be the target coordinates offset by 1). This could be a general problem with how Microsoft® Edge processes drag and drop events and might therefore be applicable to other scenarios as well.

  • If you experience webdriver crashes after test script execution you might need to increase the SoftExitTimeout: Configuring squishrunner (Section 7.4.3.25)

3.1.7.6. Chromium-based applications

Support for automating the web content in Chromium-based applications is provided through the Webdriver for Chromium. The Webdriver is not redistributed with Squish so you have to download it from Google. Download Chromium Webdriver

[Note]Note

Different versions of Chromium require to use different versions of the chromedriver executable, in particular newer chromedriver versions do not support older versions of Chromium. In order to find the right chromedriver executable you need to determine the exact version of Chromium being used in your application and check the release notes of chromedriver on the above linked download page to find the chromedriver version suitable for your application. Older releases can be accessed by going to the parent directory from one of the newer download links, which leads to a directory listing all versions.

In order for Squish to find the downloaded Chromium webdriver executable you can place it into a directory that is in your PATH. As an alternative you can configure the location in the file webwrapper.ini that you can find in the etc directory of your Squish installation. Open the file in a text editor and replace the value 'chromedriver' in the line starting with 'ChromeDriverForChromiumBasedApps' with the absolute path of the downloaded chromedriver executable. On Windows it is necessary to duplicate the backslashes in the path to fulfill the formatting requirements of the file.

[Note]Note

If you want to automate an application that is using nw.js please make sure to use the chromedriver executable provided as part of the nw.js SDK download as the standard chromedriver seems to not work properly at the time of writing this.

In order to tell Squish about your Chromium-based application please select it as the browser executable in the Server Settings Dialog of the IDE. You can access the dialog by opening the Edit menu and below that the Server Settings submenu. In this submenu select the entry labeled Browser. In the dialog fill in the field below Chromium-based Applications (using CEF, Electron, nw.js etc.) and make sure that entry is selected.

In case you do not use the IDE you can set the environment variable SQUISH_BROWSERPATH to point to your application.

3.1.7.6.1. Setup for attaching to a running instance
[Note]Note

You only need to follow these instructions when you want to use the attachToBrowser function. The following instructions are only needed if you plan to automate a Chromium-based application that is being started by some other program and not directly by Squish for Web.

In order to attach to a Chromium-based application its necessary to prepare Squish for automating Chromium-based applications as explained in Chromium-based applications (Section 3.1.7.6). After the basic setup has been finished it is necessary to enable remote debugging features in the Chromium-part of the application. This is sometimes exposed as a commandline flag named --remote-debugging-port but it can also be set through code in your application. The port number used for the remote debugging port number needs to be passed to the attachToBrowser function in the test script to connect to the Chromium web content in the application.

3.1.7.6.2. Known issues when using Squish with Chromium-based Applications
  • Window interaction methods (maximizing, minimizing, setting to fullscreen, changing the size) are not supported as Squish only controls the web contents but not the whole application.

  • Interaction with multiple web views in an application is possible, but limited to the web content inside them. Squish cannot make them visible/invisible or bring one view to the foreground as a human user may do.

  • Screenshot verifications and Visual verifications will be using a desktop screenshot method which requires that the webview to be verified in is visible on screen fully. Web views that are not visible, for example because they are part of another tab inside the application cannot be grabbed. In addition the Chromium-based application must not be overlapped by other applications at the time of grabbing the screenshot as the screenshot will include such overlapped applications if they're covering the web view.

  • The isBrowserDialogOpen function always yields false for Chromium-based applications.

3.1.7.7. Safari®

You can execute, record and inspect web applications running in Safari by selecting it the Server Settings dialog in the Squish IDE. Open the dialog using Edit|Server Settings and then select the Browser page. In the dropdown on the right select Safari.

3.1.7.7.1. Safari on macOS® 10.11.5 or later

macOS 10.11.5 updated the version of Safari shipped with the system which now defaults to disallow the execution of JavaScript code in the web page through AppleScript. Squish relies on this method of executing JavaScript and thus it is necessary to enable this support again when using Safari on macOS 10.11.5 or later.

In order to enable this option its necessary to make Safari show the "Develop" menu. This can be done by opening the Preferences of Safari, then selecting the Advanced tab and ensure the option "Show Develop menu in menu bar" is checked.

Once the "Develop" menu is available in the menu bar, open the menu and make sure the option "Allow JavaScript from Apple Events" is checked. This enables Squish for Web to automate Safari on macOS 10.11.5 and later.

3.1.7.8. Opera® up to version 12

You can execute, record and inspect web applications running in Opera by selecting it the Server Settings dialog in the Squish IDE. Open the dialog using Edit|Server Settings and then select the Browser page. In the dropdown on the right select Opera.

The Opera browser in versions up to 12 uses its own configuration settings for proxy servers. This makes it necessary to configure it to use the Squish for Web proxy manually, so Squish is able to automate Websites running in Opera.

Configuring the proxy can be done in the settings of Opera, they can be opened from the Menu by selecting the "Settings" entry and then in the submenu again selecting "Settings". In the dialog that appears the tab labeled "Advanced" needs to be selected to allow accessing the network configuration. The list on the left side of the tabs content has a corresponding entry called "Network" which needs to be selected. Click the button "Proxy servers" in the dialog to configure the proxy servers that Opera uses. In the newly opened dialog make sure the radio button "Use manual proxyserver configuration" is selected and check the checkbox next the "HTTP" entry. The fields "proxyserver" and "port" need to be filled with the values "localhost" and "8000" respectively. In addition the checkbox "Use the proxy for local servers" further down should be activated to make it possible to test the addressbook application that ships with Squish.

In addition to configuring the proxy, the Crash Recovery dialog in Opera should be disabled. Since the dialog cannot be automated with Squish for Web it would otherwise cause test execution abortion as it appears on each start of Opera after Squish has exited the browser. This setting needs to be changed in Operas configuration editor, which can be opened by putting "about:config" into the location bar. The page that is being opened allows searching for specific settings. Use "Problem" as keyword for the search so it will reveal the configuration entry for enabling and disabling the dialog. The title of the setting is "Show Problem Dialog" and the configuration entry needs to be disabled by unchecking the checkbox next to the text.

This completes the steps needed to setup Opera for testing with Squish, you can now select the Opera executable as a browser in the IDE and record and replay tests with it.

[Note]Note

Opera versions newer than 12 are currently not supported by Squish for Web

3.1.7.9. Browsers on mobile devices

This section assumes Squish for Web 6.1 or later is installed on a desktop operating system. (see Installing the Command Line Tools, Server, and IDEs (Section 3.1))

[Note]Note

Examples contain system prompt symbols which may vary, and using Windows, the commands do not include the leading ./

3.1.7.9.1. Start the HTTP proxy

Start the HTTP-Proxy server by executing the following command in the console (this uses the default HTTP-proxy server port 8000):

[Note]Mac users

Confirm Python 2.6 or greater installed before proceeding

$ ./bin/webproxy/proxy
3.1.7.9.2. Configure Device Proxy Connection

Connect your mobile device or tablet to the same network as your computer, and configure the device to use the computer's proxy server as follows:

  • Android Device

    1. From Settings, tap Wi-Fi

    2. Tap and hold the currently active wireless network connection, and select Modify network

    3. Tap the Show advanced options check box

    4. Click the Proxy box and select Manual

    5. Enter the computer's IP address or name in the Proxy hostname box

    6. Enter 8000 in the Proxy port box, this is the standard port used by the HTTP-proxy

    7. Tap Save

  • iOS Device

    1. From Settings, tap Wi-Fi

    2. Tap the Information button (i) for the currently active wireless network connection

    3. Tap Manual in the HTTP PROXY section

    4. Enter the computer's IP address or name in the Server box

    5. Enter 8000 in the Port box, this is the standard port used by the HTTP-proxy

    6. Tap <Wi-Fi

  • Test Device Connection To test the connection, open a browser on the device and navigate to http://<anyURL>/startsquish/. The browser page loads: “Squish/Web Automated GuiTesting Waiting for start of next testcase...

3.1.7.9.3. Configure Squish for Web IDE

From the computer, open the Squish (for Web) IDE, select Edit|Server Settings|Browser, and choose the Browser on Mobile Device option.

This completes the device-specific setup for Squish for Web! You can now record and playback tests using the Squish IDE on the computer just as you can with standard web testing; only now when recording, the actions all take place on the device—and, of course, the playback also takes place on the device.

3.1.7.9.4. Limitations

At the time of publication, testing Browsers on devices had some limitations compared with web testing on desktops. The most significant known limitations are:

  • No support for testing native dialogs; this includes file upload fields.

  • Cannot use one proxy for multiple parallel test executions/recordings.

  • Does not work with popup blockers when using a manually-started browser/proxy; popup blockers need to be disabled in the browser prior to testing.

  • Cannot use Screenshot Verification points with remote browsers (iphone/ipad browser testing), this is due to the screenshot code being purely C++ code in the webhook.

  • Complex Touch/Gesture events are currently not recognized/recorded/replayable with Safari on iOS. Simple tap interactions do work.

  • The HTTPS protocol is not supported.

  • Windows: Sometimes picking only works on the complete browser window and buttons; this can be fixed by renaming SQUISHDIR\bin\winhook.dll.

  • Browser shows a "session not correctly ended" dialog. This is due to the way we exit the browser; usually the browser has a setting to avoid the dialog.

  • Browser shows a progress indicator all the time. This is due to the way the internal communication with Squish/Web and the proxy works.

3.1.8. Installation for Flex applets in web pages

In order to automate Flex applets running in a web browser, the “Adobe Flash Debug Player” must be installed. You can find out which version of Flash Player (if any) you're currently running by visiting the Flash Player version page. Make sure to visit this page using the browser which you will be using for recording and running Squish tests - so if Google Chrome is your default browser but Microsoft Internet Explorer is the one used for executing tests, make sure to use Microsoft Internet Explorer for visiting the Flash Player version page.

Start the player check by clicking the Check Now button on the web page. The Your Flash Version field should say (debug version). If this is not the case, please uninstall the player following the instructions given on the Uninstall Flash Player (Windows) or Uninstall Flash Player (Mac) pages.

The debug players can be downloaded from the Adobe Flash Player Support Center - do not use the Get the latest version link at the top of the page but rather use the links further down the page:

[Note]Internet Explorer on Windows 8 and newer

Windows 8 and later include the Flash Player for Internet Explorer as an integral part of the system and it is currently not possible to remove that or replace it with the debug version of the Flash Player from Adobe. Even though the download page at Adobe provides downloads for Windows 8 we have not seen any success in trying to use them. So in case you are using Windows 8 or later you'll have to use either Firefox of Google Chrome to test Flex applications with Squish.

  • Windows Flash Player ActiveX control content debugger” if you use Microsoft Internet Explorer on Windows 7 or older.

  • Flash Player for Windows 8” if you use Microsoft Internet Explorer on Windows 8; make sure to use the “x86” package for 32bit Windows and “x64” for 64bit Windows.

  • Flash Player for Windows 8.1” if you use Microsoft Internet Explorer on Windows 8.1; make sure to use the “x86” package for 32bit Windows and “x64” for 64bit Windows.

  • Windows Flash Player Plugin content debugger” if you use Firefox or Google Chrome on Windows.

  • Macintosh Flash Player Plugin content debugger” if you use a browser on macOS.

  • Linux Flash Player Plugin content debugger” if you use a browser on Linux.

[Note]Google Chrome-specific Setup

Google Chrome has a built-in Flash plugin which needs to be disabled so that the debug player is used instead. To do so, perform these steps after installing the debug player mentioned above:

  1. Start Google Chrome from the Squish IDE using the Launch AUT button. This is important as starting Google Chrome from Squish uses a separate directory for storing all kinds of user data and part of this data is the enablement of the Flex plugin and which of the Flex plugins is used.

  2. Enter about:plugins into the location bar of the newly opened Google Chrome window to open the plugin configuration.

  3. Click the [+] Details link at the right hand side of the Plug-ins section to see the details for all installed plugins.

  4. Locate the Flash part in the Plug-ins section. There should be at least two plugins listed - the builtin plugin and the one which was just downloaded and installed.

  5. The newly installed debug player can be identified by considering the file name of the plugin shown in the Location: field - use the following table to tell whether a plugin is the built-in Flash player or the recently installed debug player (the "system player"):

    PlatformBuilt-in Flash Player filenameSystem Flash Player plugin filename
    Windowspepflashplayer.dllFilename starts with NPSWF32
    macOSFlash Player Plug-in for Chrome.pluginFlash Player.plugin
    Linuxlibpepflashplayer.solibflashplayer.so

    Make sure that the built-in player(s) are disabled by clicking the Disable link and enable the system plugin by clicking Enable if needed - you may find that it's enabled already.

  6. Close the Plugins tab and any other open tabs to shut down the browser.

The builtin Flash player is now disabled, and Google Chrome will use the downloaded debug player.

After installing the correct player, please visit the Flash Player version page to verify that you're now running Flash Player and that the Your Flash Version field says (debug version).

3.1.9. Installing Squish for Android

Squish can be used to test software for Android that meets the following prerequisites:

  1. The application must provide a user interface.

  2. From the application, a test package has to be made and installed.

For the second prerequisite, a JavaJDK, version 7 or higher, and optionally the Android SDK has to be installed.

With the prerequisites in place, Squish can be used to test the application, either using an Android emulator or using an Android device connected to the machine running Squish via USB.

[Warning]OS-level changes for >= Android-28

For finding some UI elements, Squish has to use Java™ reflection in some cases. These code paths may break in future, yet unsupported, Android versions. Therefore since Android-28 (Android Pie), a warning dialog informs the user about this access. Of course that breaks UI testing and therefore Squish disables warnings dialogs, but keep warnings in the log (the logcat output).

[Note]Note

When testing on a real device using USB on MS Windows, a special USB driver (for development/debugging purposes) from the vendor of the specific Android device/model must be installed (see OEM USB Drivers, the fact that an Android device shows up as a usable device in the operating system is usually not sufficient).

[Note]Note

Linux users testing on a real device using USB should make sure the access permissions to the device are configured properly (see Using Hardware Devices).

3.1.9.1. Make the Android app testable

Squish can record and replay test scripts for your application when there is a package containing the SquishHook instrumentation that has the target set to your application's package name.

3.1.9.1.1. Using a separate test package

This is the method used by the Squish IDE. The IDE will build a test apk, re-sign your apk and finally install both. Either when choosing a new package in the test suite settings page or Manage Android AUTs in the Server Settings.

For command-line users, to create a test package, re-sign yours and install, run

apk-tool -a <path-to-android-sdk> -j <jdk> -pkg <your-apk> -o <temp-dir> -d <device>

where apk-tool is a script found in the Squish' bin directory, jdk the full path to a JavaJDK, version 7 or higher, and temp-dir some directory where apk-tool writes some temporary files.

The -a option may be omitted. Squish has the required tools packed. Use it when your app uses more up-to-date resources from the Android SDK.

The -j option may be omitted when both java and jarsigner are in your path.

You can pass multiple -d device pairs to the apk-tool.

[Note]Note

The packages installed by apk-tool may conflict with a previous installed package due to re-signing. Either uninstall it manually first or edit the apk-tool script Settings for Signing field to match the keystore and credential your apk is using.

3.1.9.1.2. Using a built-in SquishHook

This is an alternative method to get a testable application. Instead of creating a test apk, the squish hook can be built-in too. This may be a faster compile/test cycle in some work loads.

We take as example AddressBook, which you can find in the android directory under examples.

This project was created as

$ android-sdk/tools/android create project --target android-8 \
    --name AddressBook --path AddressBook \
    --activity AddressBook --package com.froglogic.addressbook

To compile this application yourself, first create a local.properties file containing

sdk.dir=path-to-your-android-sdk

[Note]Note

When on MS Windows, either use forward slashes or use double backslashes for the path.

Next, create a project.properties file containing

target=android-8

[Note]Note

Look in your Android SDK directory for the possible targets. The targets are the subdirectories under android-sdk/targets/. Here we use target android-8.

Then create a libs subdirectory and copy the file squishandroid.jar in there.

To add support for UiAutomation, also the jars testing-support-lib and uiautomator can be copied to libs. These two jars can be retrieved from the Android-SDK extras/android/m2repository/com/android/support/test directory, when having 'Android Support Repository' installed. Unzip the aar files and rename classes.jar so that these two jars don't overwrite each other.

Edit the AndroidManifest.xml file to enable Squish instrumentation.

Edit the AndroidManifest.xml file to add android.permission.INTERNET permission.

[Note]Note

The above two steps have been done for the AddressBook application already

To build the application, execute

$ ant debug

Start the device or emulator, and once it is ready, install the application by executing

$ android-sdk/platform-tools/adb install -r bin/AddressBook-debug.apk

Naturally, you must replace android-sdk with the full path to your Android SDK installation.

3.1.9.1.3.  Starting the AUT

For more information of starting the application in a test script, see Notes on using startApplication with Android (Section 5.12.2)

You can check to see if Squish can see multiple devices and emulators by executing:

squishrunner --info androidDevices

To see all applications that Squish can use, run

squishrunner --info androidInstrumentation
[Note]Note

squishserver must be running to handle the --info request.