9.13. IBM Rational Quality Manager integration

Table of Contents

9.13.1. Installing the Squish Adapter
9.13.2. Squish Adapter Concept
9.13.3. Preparing test configuration files
9.13.4. Starting the Squish Adapter
9.13.5. Using the Squish Adapter from Rational Quality Manager
9.13.6. Executing a Test Script

Rational Quality Manager is a test management tool from IBM. For more information about Rational Quality Manager see ibm.com. Squish tests can be started from Rational Quality Manager by using an execution adapter, the Squish Adapter. The Squish Adapter is a separate application that has to be executed in parallel to Rational Quality Manager. It may be executed on a different system than the server and needs to be registered to the server. The Squish Adapter itself has to be configured regarding the server and the Squish installation it should use.

[Note]Separate Purchase

This add-on must be bought separately. Contact for details.

9.13.1. Installing the Squish Adapter

To install uncompress the tar.gz or zip archive to a directory of your choice. The adapter may be installed on any system that can connect the Rational Quality Manager server by network. Of course Rational Quality Manager and the Squish Adapter can be installed on the same system.

9.13.2. Squish Adapter Concept

Basically a Test Script resource in Rational Quality Manager is used to select and configure the Squish Adapter which will execute the Squish test. The Test Script resource has to choose a configuration file name and the Squish test to execute. The configuration file must contain at least a base path to a directory where Squish test suites can be found.

The configuration file name will be looked up by the Squish Adapter inside a configuration file directory which can be chosen at the Squish Adapter startup. This way the Test Script does not need to be changed if it should run on another machine. Adapting the configuration file for each machine is all need to do.

9.13.3. Preparing test configuration files

The Squish Adapter uses a test configuration file when executing tests. The test configuration file is a simple text file with the file extension .conf that contains properties and their values. The adapter looks for configuration files inside the directory that is configured on startup by the argument -configDir.

[Note]Forward and backward slashes

Note that the file has to follow the syntax of Java properties files. This means that a backslash has a special meaning. If you are using Windows you should either use forward slashes or escape the backslash by writing two of them when adding an absolute path to the configuration file.

KeyValueRequiredExample
testSuiteBaseDirectoryAbsolute path to a directory which contains Squish test suites. This path will be used by the Squish Adapter to search for the test suite specified inside the Test Script resource.yestestSuiteBaseDirectory="C:\\Squish"
preExecutableAbsolute path to an executable the Squish Adapter runs before executing the test. The following arguments are passed to the executable on execution:

preExecutable working_dir test_suite [test_cases]*

  • working_dir: Absolute path to the working directory in which the adapter will store its log files.

  • test_suite: Name of the test suite which will be executed.

  • test_cases: Name of the test cases of the test suite the adapter intends to run. If no arguments are given the complete test suite will be executed.

nopreExecutable="C:\\pre_task.bat"
postExecutableAbsolute path to an executable the Squish Adapter runs after executing the tests. The postExecutable will receive the same arguments as the preExecutable.nopostExecutable="C:\\post_task.bat"
squishServerHostThis can be omitted if the squishserver should be started locally; otherwise set this to the IP address or host name of the remote PC where squishserver is running.nosquishServerHost="192.168.1.42"
squishServerPortThis can be omitted if the default behavior of using any random free port is acceptable; otherwise specify a port.nosquishServerPort="4711"

9.13.4. Starting the Squish Adapter

9.13.4.1. Preconditions

As a precondition Java 1.5 or newer has to be installed. The java executable has to be available through the executable search path of your system. As the Squish Adapter uses a Python script to convert the Squish XML result to HTML also Python of version 2.4, 2.5, 2.6 or 2.7 has to be available inside the executable search path.

9.13.4.2. Synopsis

To start the Squish Adapter you have to run the startup script. The command line arguments passed to this script are automatically written to the configuration file Config.ini which is located inside the Squish Adapter installation directory. Therefore some command line arguments are mandatory on the first run only. The arguments passed to the startup script are the same for Windows and for Linux. For Windows the startup script is named start.bat, for Linux it's start.sh. The following example will use start.bat.

start.bat {-repository https://<hostname>:<port>/<qm>} {[-user <userid>] | [-userFile <filename>]} {[-password <password>] | [-passwordFile <filename>]} {-squishDir <directory>} {-configDir <directory>} {-projectArea <name>}

The exact meaning of the individual arguments mentioned in the above synopses is as follows:

-repository https://<hostname>: <port>/ <qm>

The hostname/IP of the RQM server, the port where the RQM server is running and the context root of the Rational Quality Manager (defaults to qm, but may be customized).

-user <userid>

A registered user ID within RQM that has the license to run an adapter.

-userFile <filename>

If the registered user ID within RQM contains non-ASCII characters the ID has to be written into an UTF-8 encoded file as a single line. This is only required for the first start of the Squish Adapter when running on Windows.

-password <password>

The password of the user ID used.

-passwordFile <filename>

If the password of the used user ID contains non-ASCII characters the password has to be written into an UTF-8 encoded file as a single line. This is only required for the first start of the Squish Adapter when running on Windows.

-squishDir <directory>

Path to the directory where Squish is installed.

-configDir <directory>

Path were the adapter should look for test configuration files.

-projectArea <name>

Name or alias of the project being logged into, default is QualityManager.

The complete options for the Squish Adapter can be found inside the readme.txt file which is shipped with the tar.gz and zip file.

9.13.4.3. Example

The example shows the adapter connecting to the RQM server 192.168.1.42 on port 9443, using the default context root qm. The RQM user bert with its password xxxyz is used to use the project area froglogic. Squish is installed at C:\Squish and configuration files are searched at C:\SquishAdapterConfigs.

start.bat -repository https://192.168.1.42:9443/qm -user bert -password xxxyz -squishDir “C:\Squish” -configDir “C:\SquishAdapterConfigs” -projectArea “froglogic

9.13.4.4. Restarting the Squish Adapter

After the first run the Squish Adapter will read its configuration from the file Config.ini file by default which is located inside the Squish Adapter installation directory. Therefore no command line arguments have to be given to start the adapter.

9.13.5. Using the Squish Adapter from Rational Quality Manager

To prepare execution of Squish tests through Rational Quality Manager a Test Script resource has to be created:

  • Log into Rational Quality Manager

  • Open the project the test should be created for

  • Select Construction|Create Test Script

This creates a new Test Script. Now the Squish Adapter that should be used for test runs has to be selected and to be configured which is described as follows.

  1. Select Type|Command Line.

  2. Select Use test resources that are local to a test machine and click on Select Adapter.

  3. Select the Squish Adapter from the list and press Next.

  4. Insert Squish into the field Project Path, press Go and select the configuration file that should be used for the test runs and finally click on Finish.

  5. The test suite and test cases that should be run from this Test Script have to be defined using the field Arguments.

    PropertyMeaningRequiredExample
    test suiteName of the test suite which will be executed. The name has to meet the Squish naming convention, it has to start with the suite_ prefix.yessuite_alpha
    test casesName of the test case(s) that should be executed. Leave this argument to run the complete test suite. A test case name has to meet the Squish naming convention, it has to start with the tst_ prefix.notst_a tst_b

    Click Save to save the Test Script finally.

9.13.6. Executing a Test Script

Executing a Test Script is beyond the scope of this document. There are different ways to execute a Test Script which are described in the Rational Quality Manager manual.

The result of a Test Script run can be accessed through a Test Execution Record provided by Rational Quality Manager. The Test Execution Record shows the general result of the test run and contains some more detailed information in form of log files. The log files can be found under Result Details.

FilenameContent
server.logOutput of the squishserver process
xmlToHtml.logOutput of the conversion script
result.htmlDetailed Squish HTML test result
runner.logOutput of the squishrunner process
result.xmlSquish XML test result
preExec.logOutput of the preExecutable script if specified inside the configuration file
postExec.logOutput of the postExecutable script if specified inside the configuration file
adapter.logLog file of the Squish Adapter

The Squish Adapter will mark the execution result as Failed if any verification of the executed tests failed. In case of an error the execution result will be marked as Error. If all test verifications have been passed the result will be set to Passed.