If you're running a Jenkins job the first time it might be that you see a successful build but inside the Squish report no tests are executed like shown inside this screenshot:
Open the Runner Log to check the squishrunner output. If you see this message:
Squish failed to find its license key file. This often occurs if a different user has been used to start the Jenkins server or Jenkins node than used to install Squish. Squish looks for its license key file at $HOME
on Unix-like systems and at %HOMEDRIVE%%HOMEPATH%
or %USERPROFILE%
on Windows. Thus the path depends on the user who runs Squish.
To solve this issue either run Jenkins by using the same user than used to install Squish or make use of Squish's environment variable SQUISH_LICENSEKEY_DIR to point Squish to the Squish license key directory which contains the .squish-3-license license file.
A similar pitfall is that Squish can't find its user settings e.g. the server.ini file which among others contains registered AUT settings. This path is also user dependent. Squish uses $HOME/.squish
on Unix-like systems and %APPDATA%\froglogic\Squish
on Windows by default. Squish can be pointed to another user settings directory by using the environment variable
SQUISH_USER_SETTINGS_DIR
.
There exists several ways to setup environment variables for Jenkins but the easiest way is to set them inside a shell script or batch file which starts Jenkins or the Jenkins agent.