Squish Initialization Files
Squish uses some
.ini files to control some aspects of the command line tools and the Squish IDE's behavior. In general these files should not be edited; instead use the Squish IDE and Environment Variables to change any settings.
.ini files include
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
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 for opening files and for printing, for example. To do this, edit the
qtwrapper.ini file. You might have to create the file in the
SQUISHDIR/etc directory. Use a plain text editor to add a new line to the General group's entry, which might have to creat, so that you have:
[General] UseNativeDialogs = 1
With this in place, Squish will use native dialogs when running Qt applications on Windows. Do not do this for applications that are to be tested cross-platform with the same Squish tests.
paths.ini file is used to store various paths. For example, where global scripts are stored. For global scripts, which are stored under key "GlobalScriptDirs", when using the String findFile(where, filename) function to find a script file to pass to the source(filename) function, String findFile(where, filename) 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), 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.
ocr.ini file is used to store parameters relevant to the OCR functions like ScreenRectangle waitForOcrText(text, [parameterMap], [searchRegion]) or Boolean test.ocrTextPresent(text, [parameterMap], [searchRegion]). The settings in the
ocr.ini can be edited easily using the OCR 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
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.
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.
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
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 Qt Support Center for advice before editing this file.
© 2023 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.