B - Install Squash TA server

here

Overview

The Squash TA server is the execution server for Squash TA automated test projects. This is the execution environment called by Squash TM when the automated part of a test plan is launched. As it is based on Jenkins, you may also access it by connecting to the http://:9080/jenkins URL.

There are two versions:

    • the linux i586 execution server (it may work on other unix-like systems on x86 compatible hardware, but this has not been tested and is not guaranteed)

    • the win32 execution server

In both cases, the installation is local, self-contained, with no system level impact.

Installation

To install the Squash TA server, please go to the download page on Squashtest and download, depending on your intended host, either the squash-ta-server--linux-i568-installer.jar, or squash-ta-server--win32-installer.jar installer.

Please note that the installer depends on a working JRE (java 1.8 on). If your host has no JRE, you may download one from Oracle java download page.

  • Graphic installation procedure

Please launch the installer (if a JRE was installed using the windows JRE installer, you just need to double-click on the executable installer jar file). The welcome screen appears.

Clicking on "Suivant" (next ) you are presented with licensing information.

Clicking on "Suivant" (next) brings you to the package selection screen on which you may choose wether you want to install Sahi (a web UI testing tool) or not.

On the next screen, you can choose the installation directory for the Squash TA server. If your chosen directory does not exist yet, a warning will be shown (see below on the left) and it will be created. If it does, you are reminded that you install in an existing directory (see below on the right). In both cases you may abort, or confirm and proceed with the next step.

If you proceed, the progress screen wil keep you informed of the installation status, until all files are copied.

When the installation process is completed, you may click on "Suivant" (next) for shortcut configuration.

  • If you want some shortcuts, check the "Créer les raccourcis" (create shortcuts) box (default preselected).

  • If you want shortcuts on your desktop, check the "Créer les raccourcis sur le bureau" (create shortcuts on the desktop box (preselected).

  • The radio selector on the right side lets you choose between creating shortcuts only for yourself ("utilisateur courant" option) or all users ("tous les utilisateurs" option).

  • When done, click on "Suivant" (next), shrotcuts are created and the process is complete.

  • Command line installation procedure

To launch the installer from a console, type the following command:

java -jar yourScriptName -console

The installer first prompts for the location of the installation directory:

Select target path [/home/tester]

It then asks for confirmation:

Select target path [/home/tester]

/home/tester/squash-ta-server-linux-i586

press 1 to continue, 2 to quit, 3 to redisplay

It then continues automatically until completion:

Select target path [/home/tester]

/home/tester/squash-ta-server-linux-i586

press 1 to continue, 2 to quit, 3 to redisplay

1

[ Starting to unpack ]

[ Processing package: Sahi (1/8) ]

[ Processing package: Maven (2/8) ]

[ Processing package: Jenkins (3/8) ]

[ Processing package: scripts (4/8) ]

[ Processing package: Java (5/8) ]

[ Processing package: licenses (6/8) ]

[ Processing package: logos (7/8) ]

[ Unpacking finished ]

[ Console installation done ]

Unfortunately, due to some limitations in the izPack installer version, we cannot offer package selection from the command line. As a workaround, you may customize your installation by erasing the sahi directory and configuring the server not to run sahi (see Sahi proxy activation / deactivation below).

Jenkins manual installation

  • Why use a manual installation procedure ?

If you already have a running J2EE application server, or a running Jenkins instance, you may want to stick to it and just add the Squash TA functionality. This is possible through manual installation.

  • Procedure

First of all, choose the targeted version of the Squash TA Server you want to install (currently 1.6.1 or 1.7.0). You will find here the list of components embedded and there version for the main Squash TA Server versions. Note that, we ensure the compatibility only with the components in the same version as the one embedded in the targeted version of Squash TA Server.

1) Download the suitable Jenkins war file from the jenkins site (obviously if you already have a working jenkins instance, you can jump to step 3)

2) Deploy it in your application server following your usual procedure.

3) Install in your jenkins the required plugins (You will find here the list of plugins to install)

    • From the jenkins welcome page, "Manage Jenkins/Manage Plugins" and choose tab "Available"

    • Check the plugin to install

    • Then click on "Install without restart"

4) Configuration

      • 4.1) Retrieve the JENKINS_HOME variable value ( Value of "Home Directory" in "Manage Jenkins / Configure System" )

    • 4.2) If your targeted version of Squash TA Server is 1.6.1 then :

      • In JENKINS_HOME add mvnsettings.xml and conf.properties. The file mvnsettings.xml is a maven global configuration file. In this file, adapt the maven repository path to your needs (Modify the tag <localRepository>)

    • 4.3) If your targeted version of Squash TA server is 1.7.0 then :

        • In "Managed Jenkins / Managed files"

          • Create a new config file of type "global Maven setting.xml" with for name: "TaGlobalSettings". Adapt the maven repository path to your needs :

          • Uncomment the tag <localRepository> and put the path where you want to put the maven local repository.

          • Let the tag <localRepository> commented, then maven will use the default path (~/.m2/repository) for its local repository.

          • Create a new config file of type "Custom file" with for name "conf.properties". Let it empty, it will be filled during the TM-TA link configuration. (If you want you could copy in this file the sample in the capture below)

      • Create an environment variable named CONF_HOME which point to the JENKINS_HOME directory

5) If you use TM - TA link, you should do the configuration described here.

6) The last step consists of deploying the template :

      • Retrieve the JENKINS_HOME variable value ( Value of "Home Directory" in "Manage Jenkins / Configure System" )

      • If your targeted version of Squash TA Server is 1.6.1 (template based on a free style job)

        • Create in JENKINS_HOME/jobs a directory named "templateSquashTAExecutionJob"

        • In this new directory, copying the appropriate config.xml (windows or linux) . This is the template of Squash TA server 1.6.1. Older version are available in our bitbucket

      • If your targeted version of Squash TA server is 1.7.0 (template based on a maven job)

      • Create in JENKINS_HOME/jobs a directory named "templateSquashTAExecutionMavenJob"

      • In this new directory, copying config.xml

Server configuration

Server configuration is manual. Here are the main configuration point:

  • Default configuration

The default server configuration is as follows:

    • The execution server binds to port 9080.

    • If sahi is installed, the sahi proxy is automatically started and stopped with the execution server. It binds to port 9999.

    • An environment variable named CONF_HOME which point to the jenkins home directory (@Since Squash TA Server 1.7.0)

  • Sahi proxy activation / deactivation

Open the environment script file under /scripts (its name is env.bat in windows environments, and env.sh in linux environments) and change the value of the START_SAHI_PROXY : the value YES will cause the Sahi proxy to be started automatically when the server is started, and stopped automatically when the server is stopped. Any other value (such as NO) will deactivate Sahi proxy management. will deactivate Sahi proxy management.

  • Changing the execution server port

To change the execution port, use the usual tomcat configuration procedure in the apache-tomcat-7.0.54 directory: the HTTP ports is configured in th eapache-tomcat-7.0.54/conf/server.xml file.

<Connector port="9080" URIEncoding="UTF-8" protocol="HTTP/1.1"

connectionTimeout="20000"

redirectPort="8443" />

Note the URIEncoding="UTF-8" (New in Squash TA server 1.7.0). This specifies to tomcat the character encoding used to decode the URI bytes and prevents jenkins from complaining on the fact that your container doesn’t use UTF-8 to decode URLs

  • Using another maven or JDK installation

You can point the execution server to another JDK by editing the JAVA_HOME variable definition in the scripts/env.sh in unix, or scripts/env.bat in windows. In much the same way, you can edit the MAVEN_HOME variable definition in the environment script to point the execution server to another maven installation.

Install Squash TA Server as a Windows service

Follow the steps below to install TA Server as a service.

    • Prerequisites

Squash TA server must be installed and you need an account with administrator privileges .

    • Service installation

Open a command prompt as an administrator and run the script "TAServiceInstall.bat" which can be found in the folder "%path_TA_Server%/scripts/windows".

It is possible to change the name of the service. To do so, run the "TAServiceInstall.bat" with an additional argument (the name of the service).

    • Uninstallation

The unistallation of the TA Server service will only remove the service from the Windows registry. It will not uninstall the TA Server itself.

After if to uninstall Squash TA Server, you need to use "TAServiceRemove.bat" which can be found in "%path_TA_Server%/scripts/windows".

If the name of the service has been modified, you must pass the name of the service as a argument.

    • Start and Stop Service

Open an administrative console and enter :

net start %name_of_the_service%

net stop %name_of_the_service%

If you didn't change the name of the service, the %name_of_the_service% will be SquashTA_Server.