Table of Contents
Table of Contents
Squish uses some .ini
files to control some
aspects of the command line tools and the IDE's behavior. In general
these files should not be edited;
instead use the Squish IDE and Environment Variables (Section 7.5) to change any
settings.
The .ini
files include ide.ini
,
ocr.ini
, paths.ini
, and
server.ini
. These files are stored in the
%APPDATA%\froglogic\Squish\ver1
folder on Windows
and the $HOME/.squish/ver1
directory on Unix-like
systems such as Linux. In addition, for Squish for Qt editions there
is a file called qtwrapper.ini
which is stored in
the SQUISHDIR/etc
directory.
![]() | Squish for Qt for Windows-specific |
---|---|
If you are testing Qt applications on Windows that are not deployed or
tested on other platforms you can force Squish to use native Windows
dialogs rather than Qt dialogs (e.g., for opening files and for
printing). To do this edit the [General] UseNativeDialogs = 1 With this in place, Squish will use native dialogs when running Qt applications on Windows. Note that this should not be done for applications that are to be tested cross-platform with the same Squish tests. |
The paths.ini
file is used to store various
paths—for example, where global scripts are stored. In the case of
global scripts (which are stored under key
“GlobalScriptDirs”), when using the findFile
function to find a script file to pass to
the source
function, findFile
first looks in the test case's scripts
directory, then in the test suite's shared scripts directory, then in
the paths listed in the paths.ini
file, and finally
in the directories listed in the SQUISH_SCRIPT_DIR
environment variable. (The search stops as soon as the file is found.)
The paths.ini
file shouldn't need to be hand edited
(see the Global Scripts view (Section 8.2.7)), but if you move
your Squish setup to another system you will want to copy this
file—assuming that you use the same paths of course.
The ocr.ini
file is used to store parameters relevant
to the OCR functions like waitForOcrText
or
test.ocrTextPresent
. The settings in the
ocr.ini
can be edited easily using the
OCR Preferences
pane. The currently available options are
[General] DefaultEngine = "Tesseract" [Tesseract] InstallPath/40 = "/path/to/tesseract-for-squish-4.0.0" [OCRSpace] ApiKey = "XXXXXXXXXXXXXXX" ApiEndpoint = "https://api.ocr.space/parse/image" [Rekognition] ApiKeyId = "XXXXXXXXXXXXXXXXXXXX" ApiKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" Region = "eu-west-1"
DefaultEngine
in the General
section is the default
OCR engine used by Squish. Currently supported values are Tesseract
,
OCRSpace
and Rekognition
which correspond to the
Tesseract OCR,
OCR.Space and
Amazon Rekognition Text respectively.
InstallPath/40
in the Tesseract
section is the
installation path of the Tesseract for Squish package.
ApiKey
in the OCRSpace
section is the secret key
used to authenticate the user with the OCR.Space service. You can request an
API key for the OCR.Space service
here.
ApiKeyId
and ApiKey
in the Rekognition
section are the secret key ID and the secret access key used to authenticate
the user with the Amazon Rekognition service. Instructions to create an API
key set for the Amazon Rekognition service are available
here.
Region
in the Rekognition
section is the name of the
regional server used with the Amazon Rekognition service. The current list of
servers that support Rekognition is available
here.
The squish.ini
file is used to store some important
Squish settings, so it should be edited with care.
One of the file's General
section entry's keys is
Wrappers/Qt/InitScripts
, and its value is a comma-separated
list of Tcl files used to initialize Squish for Qt (no matter what
scripting language is used for Qt tests). If you would like to enable or
disable event compression (e.g., enable to combine lots of small mouse
moves into a single mouse move) you can do so by adding a new Tcl file
to this entry's list called eventcompression.tcl
.
This file should contain one or more lines such as this:
enableEventCompression GLWidget false
Here, event compression for GLWidgets has been switched off. You can
have as many lines of this form as you like so long as each one has the
same format with the second word being the name of the relevant class
and the third word being true
or false
.
Squish for macOS, and Unix versions of
Squish for Qt,
Squish for Tk, and
Squish for Xview, read a file at startup,
SQUISHDIR/etc/ignoredauts.txt
, if it exists.
The file is a list of process names, one per line. On Linux each process
name is the same name as the executable binary file; on other systems it
is the name used by the ps or
top programs.
Squish will not hook into any process listed in
this file. This blacklist exists to provide a last resort means of stopping
Squish from hooking into a sub-processes launched by an AUT that would
be adversely affected by an attempt to hook into it—for example,
it might terminate prematurely. If you have a problem with hooking
into a sub-process it is best to contact froglogic's technical support
for advice before editing this file.