IBM Rational Quality Manager Integration

Rational Quality Manager is a test management tool from IBM. 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: This add-on must be bought separately. Contact sales@froglogic.com for details.

Installing the Squish Adapter

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

Squish Adapter Concept

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 specify 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.

Squish Adapter looks for the configuration file in a configuration file directory which can be chosen during Squish Adapter startup. This way, you do not need to change the Test Script to run the adapter on another machine. You only need to adapting the configuration file for each machine.

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 during startup by the argument -configDir.

Note: 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 in 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: Names of the test cases 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"

Starting the Squish Adapter

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.

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 in 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 uses 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 user ID contains non-ASCII characters, it 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 contains non-ASCII characters, it 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. The default value is QualityManager.

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

Example: Start RQM Server

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 the password xxxyz is used to log into 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

Restarting the Squish Adapter

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

Using the Squish Adapter from Rational Quality Manager

To prepare execution of Squish tests through Rational Quality Manager, create a Test Script resource:

  1. Log into Rational Quality Manager.
  2. Open the project the test should be created for.
  3. Select Construction > Create Test Script.

This creates a new Test Script. Now select the Squish Adapter to use for test runs and configure it as follows:

  1. Select Type > Command Line.

    {}

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

    {}

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

    {}

  4. Enter Squish into the field Project Path and click Go. Then select the configuration file to use for the test runs, and finally click Finish.

    {}

  5. In the Arguments field, specify the test suite and test cases to run from this Test Script.

    {}

  6. Click Save to save the Test Script.
ArgumentMeaningRequiredExample
test suiteName of the test suite which will be executed. To meet the Squish naming conventions, the test suite name has to start with the suite_ prefix.yessuite_alpha
test cases:Names of the test cases that should be executed. Leave this argument empty to run the complete test suite. To meet the Squish naming conventions, the test case name has to start with the tst_ prefix.notst_a tst_b

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 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 in the configuration file
postExec.logOutput of the postExecutable script if specified in the configuration file
adapter.logLog file of the Squish Adapter

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

© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.