There are three separate environments that must be considered when testing AUTs:
The squishrunner environment where test scripts are executed.
The squishserver's environment.
The AUT's environment (in which some Squish code also runs).
For AUTs started with startApplication
, we can easily add
environment variables in the Test Suite Settings view (Section 8.2.16)'s
Environment section. In addition,
the squishserver sets some environment variables that are visible to
the AUT; for more about these see Setting Environment Variables (Section 7.3.3).
On the command-line, for attachable AUTs started with start*aut, or for squishserver and squishrunner, we can set the environment variables that influence them before running them.
SQUISH_DUMP_FILE_PATH
– This is read in the AUT's,
squishrunner's and squishserver's environment on the Windows platform. When set
the value defines where Squish stores dumps from crashed processes (its own as
well as AUT processes). The default value for this variable points to a
directory named SquishDumps in the users temporary files directory.
SQUISH_DUMP_FILE_USE_MSGBOX
– This is read in the AUT's,
squishrunners and squishserver's environment on the Windows platform. If set to
1 (the default value) Squish will show a dialog when it detects a crash in one
of its own processes or the AUT process indicating where to a find a dump file
from the crash which can be used to obtain further details. When being set to 0
Squish will not show a dialog, but instead print a message to the output of the
process with the path to the dump file that has been generated. It is advised
to set this environment variable to 0 for automated execution of Squish tests
as the dialog will block further execution of tests.
SQUISH_LIBQTDIR
– This is read in the AUT's
environment by the Squish hooking code and by squishserver for
Qt-based AUTs. If set, Squish will look in the directory specified by
this variable for the Qt library during AUT startup and hooking.
![]() | Deprecated |
---|---|
|
SQUISH_LICENSEKEY_DIR
– This is read in the AUT's
environment by the Squish hooking code, by squishrunner, and
by squishserver. If set, Squish will look in the directory
specified by this variable when looking for the Squish license key
file; otherwise the key will be looked for in $HOME
on Unix-like systems and in %HOMEPATH%
(or
%USERPROFILE%
if %HOMEPATH%
isn't defined) on Windows systems.
SQUISH_PREFIX
– This variable is set by
squishrunner before the script engine is started, and it is also set by
squishserver before the AUT is started. This variable can be used to find the
installation directory of Squish from test cases, as well as from the AUT.
SQUISH_QML_EXTENSION_PATH
– This is read in the AUT's
environment by the Squish hooking code for Qt-based AUTs. If set, Squish
will look for QtQuick 1.x QML extensions in the directory specified by
this variable in addition to the standard extension directory. (See Installing QML Extensions (Section 6.4.2.2).)
SQUISH_QTQUICK_EXTENSION_PATH
– This is read in the AUT's
environment by the Squish hooking code for Qt-based AUTs. If set, Squish
will look for QtQuick 2.x extensions in the directory specified by this
variable in addition to the standard extension directory. (See Installing QML Extensions (Section 6.4.2.2).)
SQUISH_SCRIPT_DIR
– This is read by the
squishrunner and the Squish IDE. (The latter adds the paths
contained in this environment variable to the Global Scripts
view.)
If set, in addition to looking in the test case's
scripts directory and in the test suite's shared scripts directory,
Squish will also search the directories listed in this variable when
trying to locate a script file. (From Squish 4.1 the search also
includes the paths listed in the paths.ini
file—which will be tried before those in this
environment variable; see Squish Initialization Files (Section 7.6) and the findFile
function.)
SQUISH_DLLPRELOAD_DISABLE
– This is read by
squishserver for Qt-based AUTs on Windows. If set to 1
,
the dllpreload program will not inject any
code into the AUT process but rather start it right away, i.e.
dllpreload merely executes the given command
line but provides no extra functionality.
This can be useful in complex test scenarios involving various scripts to launch tests and it's desirable to disable the functionality provided by dllpreload in certain cases without modifying the launcher scripts.
SQUISH_SHELL_ORIG_LD_LIBRARY_PATH
–
On Linux systems, LD_LIBRARY_PATH
variable is modified by
squishrunner and squishserver to help Squish find libraries. The original
value of this variable is available here.
SQUISH_SHELL_ORIG_PATH
– on Windows, the PATH
variable is modified by squishrunner and squishserver to help Squish
find DLLs. The original value of this variable can be found here.
SQUISH_TRANSLATION_AWARE_LOOKUP
– This is read by
Squish when testing Qt AUTs. If set to 1 Squish will attempt to do
reverse translations when matching AUT object properties. See How to Test Internationalized Qt AUTs (Section 5.2.9) .
SQUISH_USE_SWT
– This is read in the AUT's
environment by the Squish hooking code for Java SWT-based AUTs. This
can be set to 1
on macOS systems
being used to test Java SWT AUTs. (Not needed for any recent Eclipse/RCP
based application, which have the for SWT required -XstartOnFirstThread
option in their eclipse.ini
.)
SQUISH_USER_SETTINGS_DIR
– This is read in the
AUT's environment by the Squish hooking code, by squishrunner,
and by squishserver. If set, Squish will use this directory to
load and store its user settings, instead of the default location.
On Windows, this is %APPDATA%\froglogic\Squish
, and on
Unix-like systems (Linux, macOS, etc.), it is ~/.squish
.
SQUISH_WRAPPER_PATH
– This is read by the
squishserver. If set, in addition to searching all the paths in the
AUT Paths list, Squish will also search all the paths listed in this
variable when trying to locate a wrapper library. (For more about the
AUT Path see AUT Paths and Mapped AUTs (Section 7.3.2).)
Test scripts can access environment variables using the
scripting-language-specific technique. For example, in Python, we can
use home = os.environ["HOME"]
(having done import
os
at the top of our script), and in JavaScript we can use
var home = OS.getenv("HOME");
. Test scripts can also access
the AUT's environment by retrieving an ApplicationContext
object and using the applicationContext.environmentVariable
function;
see Application Context (Section 6.3.12).
Squish also supports other environment variables, but unlike those shown above—which must be set before Squish is run (for example, by using a shell script or batch file to set them and then to run the Squish IDE)—the other environment variables can be set inside Squish using the Test Suite Settings view (Section 8.2.16)'s Environment section; see Setting Environment Variables for the AUT (Section 7.3.3.1) for more details.