squishinfo Object
squishinfo
Object
The global squishinfo
object provides the following properties.
int squishinfo.major
This read-only property holds Squish's major version number as a single integer (e.g., 4).
int squishinfo.minor
This read-only property holds Squish's minor version number as a single integer (e.g., 0).
int squishinfo.patch
This read-only property holds Squish's patch level version number as a single integer (e.g., 1).
String squishinfo.resultDir
This read-only property holds the path to the results directory.
String squishinfo.testCase
This read-only property holds the current test case's path.
String squishinfo.testCaseName
This read-only property holds the current test case's name.
String squishinfo.testSuiteName
This read-only property holds the current test suite's name.
int squishinfo.version
This read-only property holds Squish's complete version number (major/minor/patch/release) as a single integer (see explanation further on).
The squishinfo.version
number is a unique number that represents the complete Squish version number (major/minor/patch/release). The number is composed of four bytes by representing each part as a one-byte hexadecimal number. So Squish 4.0.1-final would be represented by the number 0x040001FF
where the 0x04
is the major version (4), the 0x00
the minor version (0), the 0x01
the patch version (1), and the 0xFF
the release (final). The release is encoded using one of three hexadecimal numbers: 0xAA
is used for "alpha", 0xBB
for "beta", and 0xFF
for "final".
Using a hexadecimal format version number makes it easy to write version-specific code in test scripts. Here's an example where we want some code executed only for Squish 4.0.0-final or later (for example, to take advantage of some Squish 4-specific functionality):
if squishinfo.version >= 0x040000FF: # code meant for Squish version 4.0.0-final or higher
if (squishinfo.version >= 0x040000FF) { // code meant for Squish version 4.0.0-final or higher }
if (squishinfo->version >= 0x040000FF) { # code meant for Squish version 4.0.0-final or higher }
if Squishinfo.version >= 0x040000FF # code meant for Squish version 4.0.0-final or higher end
if {[squishinfo version] >= 0x040000FF} { # code meant for Squish version 4.0.0-final or higher }
String squishinfo.version_str
This read-only property holds Squish's version number as a human-readable string (e.g., "4.0.1-final").
—squishinfo.settingsGroup
deprecated
—String
This read-only property holds the current test's currently active settings group.
© 2024 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.