Table of Contents
Jenkins is known as a Continuous Integration (CI) tool. It allows you to kick off processing jobs in response to events, or on a regular schedule. With Jenkins, you can also monitor executions, and examine the results. Jenkins is commonly used to build software, or run regression tests. (For more about Jenkins see https://jenkins.io/.)
Using the plugin described in this section, it is possible to run Squish tests as part of a Jenkins job.
Table of Contents
![]() | Release Notes and README |
---|---|
Remember to get familiar with Release Notes and README files before installing or updating the plugin. |
The plugin can be installed in two different ways. It can be installed with froglogic Update Center. Alternatively, the plugin can be downloaded and installed manually.
froglogic Update Center is an update site that offers all Jenkins plugins developed by froglogic. To make the Update Center accessible from a Jenkins instance the UpdateSites Manager plugin can be used.
Once the UpdateSites Manager plugin is installed, open -> . Next, add a new, custom .
To configure the connection with froglogic Update Center provide
: froglogic-update-center
: https://jenkins-update-center.froglogic.com/update-center.json
When the update site configuration is done, open
-> and update the plugin list by clicking on the button. froglogic's plugins should be displayed on the , or list accordingly to the current plugin status.In some cases, Jenkins restart after the new version installation might be required to make the plugin works correctly.
The newest Squish Plugin can be downloaded from here. The minimum required Jenkins version is listed in the ReleaseNotes.txt
To install the plugin, simply download the SquishPlugin.hpi
file and move or
copy it into JENKINS_HOME/plugins
where JENKINS_HOME
is
Jenkins home directory. Once the file is in the right place it can be enabled simply by restarting
Jenkins. After the restart, there should be an entry for the Squish plugin in the Jenkins plugin
manager.
![]() | Squish Jenkins Plugin Dependencies |
---|---|
The Squish plugin for Jenkins has some dependencies on other standard Jenkins plugins which need to be installed. The first time you try to load this plugin, it may fail, listing the missing plugins. You can resolve this issue by installing them from the Jenkins Plugin Manager. The plugins are:
|
Table of Contents
![]() | Inline Help |
---|---|
Next to each Squish plugin configuration field, the
Click the button to see the detailed configuration field description and possible value examples. |
![]() | For Windows nodes executions |
---|---|
Squish tests will fail if the Jenkins node is started as Windows Service and a Jenkins plugin starts squishserver by itself! If Squish tests must be executed on the Jenkins server make sure Jenkins is not installed as Windows Service. Jenkins can be started alternatively by running “java -jar jenkins.war” from a command line. |
After checking that the Squish plugin is correctly loaded, the next step is to add Squish's installations to Jenkins Global Tool Configuration. To do so, select -> -> It's possible to specify many Squish installations. For each of them specify an installation path and a unique name.
The next step is to define a global plugin configuration in
. Usually, there is no need to change anything in that section.To run Squish tests in the Jenkins build process we must adapt a job configuration to include Squish. Here we will use the address book example that is shipped with Squish.
The only thing left to do is to add a Squish build step to the project configuration.
Now one of the specified Squish packages can be selected from the
drop-down list. Next, set up the test suite and optionally, the test cases
which we want to be carried out.
Additionally, host and port may be specified to use an already running squishserver.
In the screenshot, we have added one Squish build step which executes
the tst_adding
test case of the
suite_py
test suite.
After
/ changes to the Jenkins project, we can run it.To run Squish tests in the Jenkins Pipeline, we can use Squish Build Step in our Pipeline script.
To generate proper code we can use Jenkins built-in Pipeline Syntax functionality.
As a Sample Step we need to select squish: Runs Squish tests
.
After doing that, we can define the configuration the same way we do for Freestyle projects. When the configuration is ready we click on Generate Pipeline Script.
Now we can use generated step in the Pipeline job.
Note that the Squish Pipeline Step doesn't set a build result. It returns a test execution status based on test results, global and job configurations. Using that status a user may implement the desired handling.
The Extra Options configuration field is intended to specify additional arguments to squishrunner and squishserver.
Each option and possible arguments have to be given in separate lines.
Supported squishrunner options:
--webbrowser
(see Playback option --webbrowser
(Section 7.4.3.12))
--webbrowserargs
(see Playback option --webbrowser
(Section 7.4.3.12))
--device
(see Playback option --device
(Section 7.4.3.13))
--launcherargs
(see --launcherargs
at squishrunner --testsuite: Running tests in batch mode (Section 7.4.3.3)
--resultdir
(see squishrunner --resultdir
: Setting the Result Directory (Section 7.4.3.5))
--retry
(see Playback option --retry
(Section 7.4.3.17))
--timeout
(see Playback option --timeout
(Section 7.4.3.16))
--abortOnFail
(see Playback option --abortOnFail
(Section 7.4.3.11))
--tags
(see Playback option --tags
(Section 7.4.3.19))
--random
(see Playback option --random
(Section 7.4.3.20))
--scriptargs
(see Playback option --scriptargs
(Section 7.4.3.18))
Please note that --scriptargs
option with it's following parameters needs to be provided at the end. For example:
--webbrowser firefox --device 016d24ab5227e2ff --abortOnFail --scriptargs --param1 value1 --param2 value2
Supported squishserver --config
options (see Configuring squishserver (Section 7.4.4.3) for more details):
--config addAUT
:
--config addAUT aut path
--config addAppPath
:
--config addAppPath path
--config addAttachableAUT
:
--config addAttachableAUT aut [host:]port
--config setResponseTimeout
:
--config setResponseTimeout seconds
--config setAUTPostMortemTimeout
:
--config setAUTPostMortemTimeout milliseconds
--config setAUTTimeout
--config setAUTTimeout seconds
--config setCursorAnimation
--config setCursorAnimation on|off
The summary page lists links to the Squish report page and later on to HTML Reports.
The Squish report page appears inside Jenkins:
Jenkins Squish Results.
Table of Contents
With the Jenkins plugin, it's possible to send execution results directly to Squish Test Center instead of generating the HTML report.
To configure the connection between Jenkins and Squish Test Center open -> . In the section, the URL of the Squish Test Center needs to be provided along with Credentials.
Jenkins Global Squish Test Center Configuration.
While setting-up the credentials the Upload Token generated in the Squish Test Center.
kind needs to be selected. The value should be anSquish Test Center Upload Token.
The connection can be tested with the
button.When the connection with Squish Test Center is configured, open the job configuration page. At the bottom of the build step, select the option. After the option has been activated, new configuration fields appear. Provide necessary information and save the job configuration.
Jenkins Job Squish Test Center Configuration.