10 - Link Squash TM/Squash TA

The legacy guide to configure the link between Squash TM and Squash TA can be found here.

Introduction :

In order to use the link Squash TM-Squash TF, it is necessary to first configure the two instances.

For the configuration of Squash TF, it is necessary to configure the security, the URL retro-call and the Jenkins URL.

For the Squash TM configuration, it is necessary to configure the retro-call URL, create a user for the administration server, create at least one automation server, configure the project to use an automation server and add a link between SquashTF and Squash TM jobs.

10.1 Configuring Squash TF

10.1.1 Configuring the security parameters

In order for Squash TM to be able to order Squash TF to execute a job, a user must have been created on the Squash TF server with rights enabling him/her to execute a job.

Configuring the security of a Squash TF server is homologous to configuring the security on an embedded Jenkins Server. The solution is described as follows on the Jenkins website (Based on the standard security configuration of Jenkins) and is provided here for testing purposes only. For an industrialised solution, the user shall use a better solution fitting his/her needs and adapted to their environment (More details on Jenkins security)

    1. From Jenkins' main page, go to Manage Jenkins and then Configure global security

    2. Tick the box Activate security

    3. In Access Control/Security realm, select Jenkins' own user database

    4. Tick the box Allow users to sign-up

    5. In order to realize tests in a local environment, the simplest way is to parameter Jenkins' authorizations to Anyone can do anything.

6. Click on the [Apply] button

7. Refresh the web page.

8. Click on Create an account.

9. Create a user the login password association as follows : tmserver/tmserver


10.1.2 Configuring the retro-call TM

When Squash TF server executes a test following a request from the Squash TM server, Squash TF sends back information on the execution to the Squash TM server. This functionality works in the following way :

  • When Squash TM adresses an execution request to the Squash TF server, it also provides TF with the URL of its retro-call.

  • Squash TF uses this retro-call URL to get the login/password to use, and send to Squash TM the execution event.


On the Squash TF server side, the retro-call URL association and the login/password are done in a properties file. To modify the file :

    1. From Jenkins main page, go to Manage Jenkins and then Configuration files.

    2. Edit the file conf.properties.

    3. In this file, for each each Squash TM server using this Squash TF server, you must define a retro-call URL with a login/password associated.

    4. For a Squash TM server with the http://myServer:8080/squash retro-call URL and the login/password taserver/taserver, it is necessary to define the following properties :

    5. endpoint.1=http://myServer:8080/squash

    6. endpoint.1.login=taserver

    7. endpoint.1.password=taserver

NB :

- When using a Squash TF server of version 1.7.0 (or later) that executes a TA automation project using a 1.7.3 (or earlier) framework version, you will have to use the older syntax (and potentially the old file according to the migration procedure that had previously been used)

- The two syntaxes to define the Retro-call URL and the login/password are equivalent.

- The older syntaxe still works for a framework version newer than 1.7.0

10.1.3 Configuring the Jenkins URL

Since the Squash TF Framework 1.8.0, when the framework sends Squash TM execution information, it also provides the URL of the HTML report. In order to produce the URL of the HTML report, the variable JENKINS_URL is used. It is however necessary to parameter this variable in Jenkins :

4. From Jenkins' main page, go to Manage Jenkins and the Configure System

5. In the section Jenkins location, fill in the field Jenkins URL

6. Click on Save or Apply

NB : At Jenkins's first start, even if the property of the URL address is filled with the correct value, it is IMPERATIVE to click on Save or Apply, otherwise the variable JENKINS_URL won't be correctly set.


10.2 Configuring Squash TM


    1. Open the squash.tm.cfg.properties file located in the conf directory itself present in the Squash TM installation directory (ex : C:\Squash-TM\conf).

    2. Find the line tm.test.automation.server.callbackURL

    3. UN-comment and add the Squash TM URL (ex : http://192.168.2.138.8080/squash) . This URL is used by Squash TF server to inform Squash TM of the test progression.

    4. Restart Squash TM.

    5. This URL can also be configured from the bloc 'Public URL' in the System parameters of the Squash TM administration.

10.3 Configuring Automated execution servers in Squash TM

10.3.1 Adding a Squash TF server to Squash TM

The Squash TM server must be started. The server(s) Squash TF do not need to be running in order to parameter the following configurations in Squash TM :

10.3.1.1 Create a user for the automated execution server

  1. In Squash TM, click on Administration (at the top-right corner) and then on Users.

  2. Add a new user with the button [Add]

  3. the pop-up Add a user appears :

  4. In the field Group, select the option Test Automation Server.

  5. Fill the field Login with the login configured in Squash TF's file conf.properties.

  6. Fill the field Password with the password configured in Squash TF's file conf.properties.

10.3.1.2 Create an automated execution server

7. In Squash TM, click on the link Administration (on the top-right corner) then click on Test Automation Server.

8. Add a new server with the button [Add].

9. The window New Test Automation Server appears :

10. Fill the field name with the name you want for the server.

11. Select the server type. At the moment, Jenkins is the only one available.

12. Fill the URL field with the URL of the Squash TF server (ex : http://192.168.2.138:9080/jenkins).

13. To add a new server, click on the button [Add another] and start back from the steps 4 to 8. Otherwise, click on the button [Add].

14. To finish the server configuration, click on the name of the server and then fill in the server access credentials on its consultation page.

15. In case you are using the master server with slaves, it is possible to tick the box "allow the manual choice of the automation server when executing automated tests (meaning that this server must be a master)". This option enables the user to choose which execution server to use when launching the tests.

10.4 Upgrade Squash TF server

10.4.1 Migration from version 1.6.1 to 1.7.0

10.4.1.1 Server migration

    1. Download the Squash TF server version.

    2. Install the new Squash TF server version.

    3. Stop both the older and newer versions of Squash TF.

    4. Copy the content of the file JENKINS_HOME/jobs from the previous installation in the directory JENKINS_HOME/Job of the new installation.

    5. Copy the files JENKINS_HOME/mvnsettings.xml and JENKINS_HOME/conf.properties from the previous installation in the directory JENKINS_HOME of the new installation.

    6. Start the new Squash TF server.

    7. Check in the Jenkins logs that the restoration went well.

    8. If additional plugins were installed, you'll have to re-install them (and re-configure them if necessary).

    9. In Jenkins' main page, go to Manage Jenkins and then Configuration files.

        1. Configure TAGlobalSettings in the same way that you've configured mvnsettings.xml when you copied it during the step 5.

        2. Configure conf.properties in the same way that you configured conf.properties in the step 5.

    10. Check that all jobs that previously worked are still working on the new installation.


10.4.1.2 Job migration

The job template embedded in the server Squash TF 1.7.0 is based on a Maven job while the template embedded in the previous versions was based on a styleless job. The principal advantage with the new job is that it is independant from the OS. Since the new Squash TF server is capable of using Jenkins in a mode slave/master, it was necessary to have a job that may be executed on a slave Windows or Linux (hence the change).

It is still possible to modify the older template in order to support the novelties, however we encourage our users to migrate on the new job template for this old template won't receive updates in the later versions. The migration consists in creating a new job based on the new template ("templateSquashTAExecutionJob") using the classic job creation procedure.

NB : When using the TM-TA link, the version 1.19.0 (or any older version) do not allow to execute new jobs. The version 1.10.0 of Squash (or newer) is necessary.


10.4.2 Migration from two versions 1.6.1 or older


    1. Download the Squash TF server version.

    2. Install the new Squash TF server version.

    3. Stop both the older and newer versions of Squash TF.

    4. Copy the content of the file JENKINS_HOME/jobs from the previous installation.

    5. In the JENKINS_HOME/jobs directory, copy the folder "TemplateSquashTAExecutionJob" in a secure location, outside of the directory JENKINS_HOME.

    6. Replace the content of JENKINS_HOME directory from the newer installation by the content of the JENKINS_HOME directory copied during step 4.

    7. After the replacement, delete the directory "templateSquashTAExecutionJob" situated in the JENKINS_HOME/jobs of the new installation and replace it by the one copied during step 5.

    8. Start the new Squash TF server

    9. Check in Jenkins' logs that the restoration went well.

    10. Check that all jobs that previously worked are still working on the new installation.

NB : By default in the Squash TF server, JENKINS_HOME is : INSTALL DIRECTORY/execution home

There is a Jenkins plugin to create and import backups : https://wiki.jenkins-ci.org/display/JENKINS/thinBackup