20.3. Mercury Quality Center™ Integration

20.3.1. Integration Features
20.3.2. Installing The Integration Plugin
20.3.3. Configuration of the Plugin
20.3.4. Using the Integration From Mercury Quality Center
20.3.5. Using the Integration from the Squish IDE

With this addon package, Squish integrates tightly with any Mercury Quality Center™ server, allowing to export test cases and test suites from the Squish IDE into the Mercury Quality Center™, running Squish tests from within Mercury Quality Center™ and inspecting the test results in the browser and more. All that's necessary for this is an extra software package provided by froglogic which installs a plugin into your Mercury Quality Center™ server, making it aware of how to invoke Squish. No changes to the Squish IDE are necessary.

20.3.1. Integration Features

Here's a quick overview what you can do when integrating Mercury Quality Center™ with Squish.

From within Mercury Quality Center™ you can...

  • Create new Squish test suites and test cases in any of the scripting languages supported by Squish.

  • Edit test scripts of Squish test cases.

  • Run Squish tests on any host known by Mercury Quality Center™.

  • Run arbitrary commands before and after a test case is run.

  • Inspect the results of a test run without having to start the Squish IDE.

  • Inspect results of any previous Squish test runs, all test runs are recorded in the Mercury Quality Center™ database.

From the Squish IDE you can...

  • Create test suites directly within the Mercury Quality Center™ without leaving the Squish IDE.

  • Open test suites which are stored in the Mercury Quality Center™.

  • Edit test scripts, object maps, suite configuration, test data and more of test suites stored in the Mercury Quality Center™ - any changes done are transparently uploaded to the Mercury Quality Center™.

  • Maintain multiple test suites which come from different Mercury Quality Center™ servers in the same Squish IDE.

20.3.2. Installing The Integration Plugin

Besides the augmented Squish IDE, the Mercury Quality Center™ integration consists of a special software package which needs to be installed on the computer on which the Mercury Quality Center™ server is running. The installation is done by a mostly automatic installer program and should be finished within five minutes.

[Warning]Warning

Please note that during the installation of the Mercury Quality Center™ plugin, the Mercury Quality Center™ server needs to be shut down (and then restarted) by the installation program. Hence, users won't be able to connect to the Mercury Quality Center™ for a short period during the installation.

Please note that this installation process only has to be executed once, on the Mercury Quality Center™ server. The client desktops won't need any installation at all.

20.3.2.1. Choosing the Quality Center Folder

After acknowledging the welcome page, the first step in the installation process is to tell the setup program where Mercury Quality Center™ was installed on the computer.

A picture of the first page of the wizard used for installing the Mercury Quality Center™ integration plugin.
The first page of the wizard used for installing the Mercury Quality Center™ integration plugin.

Specify the folder in which Mercury Quality Center™ was installed on this computer in the input field, or use the button at the right side of the input field to open a dialog which lets you browse to the directory. The setup program will try to find your Mercury Quality Center™ installation automatically, but depending on your software configuration this might not work in any case. If the input field stays blank, you have to specify the path yourself.

Often, the directory has a name like C:\Program Files\Mercury Interactive\Quality Center or similar.

As soon as you have specified the correct directory, the Next button which commences the installation of the plugin becomes available. Just click it to start the installation.

[Warning]Warning

Even though the installation program takes great care to not to cause and stale files in case an error occurs during the installation, it cannot be guaranteed that i.e. a power outage during the installation won't cause any data corruptions. Hence, it is suggested that you first try the installation process on a spare server.

20.3.2.2. Monitoring the Installation Progress

After specifying the folder in which Mercury Quality Center™ was installed, the setup program begins with deploying all files which are required to access Squish from within the Mercury Quality Center™. This process should take roughly five minutes.

A picture of the Mercury Quality Center™ plugin installation wizard deploying the files to the server.
A picture of the Mercury Quality Center™ plugin installation wizard deploying the files to the server.

In case anything goes wrong during the installation, a message box will be shown giving detailed information about what happened. Any stale files installed up to that point will be removed.

20.3.2.3. Post-Installation Registration

After installing the files composing the Mercury Quality Center™ integration plugin, the setup program can augment the Mercury Quality Center™ server's configuration file automatically so that it becomes aware of the new plugin files. However, administrator login credentials are required for this. In case you have access to that login data, you can specify it on this screen to let the setup program do the work.

A picture of the Mercury Quality Center™ plugin installation wizard's configuration page.
A picture of the Mercury Quality Center™ plugin installation wizard's configuration page.

You can also skip this step by pressing the Next button at the bottom of the setup program window. However, you'll have to do the required configuration by hand then before you're able to use the Squish integration from within Mercury Quality Center™.

20.3.2.4. Manual Plugin Registration

In some situations it may be necessary to register the Squish plugin in the Mercury Quality Center™ server manually. This registration however requires having the proper login credentials to your Mercury Quality Center™ server (to the Project Customization interface, in particular). Please check back with your system administrator to find out whether you can do this yourself.

For registering the Squish test type, open the Project Customization interface (available through the Customize link at the left hand side of the Mercury Quality Center™ login screen). Then, select Customize Project Entities from the links at the left side. In the dialog that shows up, navigate through the tree view of items by selecting TEST, System Fields and then Type.

The right side of the dialog will be populated with controls now. One of them is a button labelled Goto List which you need to click to open the list of test types. In the list dialog, click on the button labelled New Item and enter the string SQUISH-TEST exactly like that (all uppercase, a dash separating the two words) and press OK.

Close the list dialog by clicking on Close, close the Customize Project Entities dialog by clicking on the button labelled OK, then log out of the Project Customization interface by selecint Logout in the upper-right corner of the screen.

20.3.3. Configuration of the Plugin

After the plugin has been installed and registered, you will need to setup the initial configuration. You might also want to adjust and augment the configuration lateron. How this is accomplished will be discussed in this section.

The configuration of the Squish integration plugin consists of two settings keys which are stored in the Site Configuration of your Mercury Quality Center™ server.

SQUISH_SCRIPTING_LANGUAGE

Indicates the scripting language to be used when creating new Squish test cases within the Mercury Quality Center™. Can be Python, Tcl or JavaScript.

SQUISH_PATHS

This string in the format <hostname>=<path>, <hostname>=<path> tells the Squish plugin, where the Squish installation can be found on each of the hosts on which you intend to run the tests. <hostname> can be the name of a host (or an IP address of one) on which a test should be run. <path> stands for the path on which Squish is installed on the given host.

An example entry which describes that on the host TREBULUS Squish is installed in C:\Tools\Squish and on the host with the IP address 192.168.42.3 Squish is installed in E:\Deploy\Tools\Squish-Stable looks like this:

TREBULUS=C:\Tools\Squish,192.168.42.3=E:\Deploy\Tools\Squish-Stable

You need to configure these entries before being able to execute Squish runs in the Site Configuration. In case they don't exist yet, you might have to add them. To do so, open the Site Administrator interface of Mercury Quality Center™, then click on the Site Config tab at the top of the screen to move to the site configuration screen. Here you can add and edit any keys.

20.3.4. Using the Integration From Mercury Quality Center

After the integration plugin has been installed and configured correctly, you can work on Squish tests from within Mercury Quality Center™ fairly easily. All changes you do to test cases from within the Mercury Quality Center™ can be seen from the Squish IDE and vice versa.

20.3.4.1. Creating New Test Cases

Creating new Squish test cases within the Mercury Quality Center™ works virtually the same as creating any other kind of test. In the Test Plan module, create a new test folder called froglogic Squish Tests. In this folder, you can then create as many test folders (preferably you start the names of the folders which are going to contain test cases with the suite_ prefix, since the Squish IDE expects that) as you want.

[Note]Note

As described further down, only those test suites which are in the froglogic Squish Tests folder are visible from the Squish IDE. You can create Squish tests in another Mercury Quality Center™ folder as well and execute them. They won't be visible from the Squish IDE though.

Here's a quick rundown on how to create a new Squish test in Mercury Quality Center™ which will be visible from the Squish IDE.

  1. Log into the Mercury Quality Center™ project to which you want to add a test.

  2. Click on the button labelled Test Plan at the left side of the screen to move ot the Test Plan module.

  3. In the tree view of the Test Plan module screen, open the froglogic Squish Tests folder. If it doesn't exist yet, create it using the New Folder button above the tree view.

  4. Right-click on the froglogic Squish Tests folder item to open the context menu. In the context menu, select New Test....

  5. In the dialog that shows up, select SQUISH-TEST from the combo box to indicate that you want to create a Squish test. Choose any name for the test you want, then press OK.

  6. In the Required Fields that now shows up, select any values which are appropriate for your organizational testing discipline. For this sample, choose any values you want (you can always change them lateron), then press OK.

Congratulations, you just created a Squish test!

Since Squish tests always have at least one test script attached to them, you could now switch to the Test Script tab of the newly created test case to see the simple (mostly empty) test script.

20.3.4.2. Running Squish Tests

Executing this Squish test works like executing any other test which is stored in a Mercury Quality Center™ server: move to the Test Plan module by clicking on Test Plan on the left side of the screen, then drag the tests you want to execute into the exeuction grid. When you have assembled all tests for a test run, press the Run button to run the test.

Executing a Squish test within Mercury Quality Center™ will cause the integration plugin to invoke squishrunner, much like the Squish IDE does internally. You might want to pass special arguments to squishrunner when executing the test though (for instance, you probably want to specify any additional wrapper libraries you want to use, and you will want to specify an application which to test).

[Note]Note

A comprehensive reference of the command line options for squishrunner is available in the command line reference section for Squishrunner (Section 19.2.1).

You can also specify arbitrary commands to be executed before and/or after squishrunner is invoked.

To configure a Squish test run, right-click on the test in the test execution grid of the Test Plan, then select Test Run Properties... in the context menu to open the dialog which presents all kinds of execution parameters. The Squish-specific settings are accessible by clicking on Configuration on the left side of the dialog, then clicking on the Automatic tab.

20.3.5. Using the Integration from the Squish IDE

When using an Squish IDE with a license key which allows accessing Mercury Quality Center™ servers, a set of new features is available which makes working with tests in Mercury Quality Center™ servers much easier. Among other things you can

  • Create test suites directly in the Mercury Quality Center™.

  • Import test suites from the Mercury Quality Center™ to the Squish IDE.

  • Export test suites from the Squish IDE to Mercury Quality Center™.

20.3.5.1. Creating a Test Suite in the Mercury Quality Center

Creating a new test suite in a Mercury Quality Center™ server works very much like creating a normal test suite locally, only one step in the creation process differs from the normal workflow.

In the Squish IDE, select File|New Test Suite to open the wizard for creating new test suites. The very first step of this wizard is what differs between creating a normal test suite and a test suite in a Mercury Quality Center™ repository.

A picture of the wizard for creating new tests suites.
A picture of the wizard for creating new tests suites.

In this very first page, right below the input field for the test suite name, a combo box lets you choose whether the test suite should be stored locally, or whether it should be created within a given Mercury Quality Center™ repository. If you decide to create the suite in a repository, then you will need to enter all required login credentials so that the data can be uploaded. All other steps of the wizard are the very same.

The login credentials used when creating the suite will be stored in the suite configuration file. Whenever you change anything in the test suite (for instance, when adding entries to the object map or when adjusting one of the test scripts), the suite will be uploaded in the background to the server so that it becomes less likely for the two copies to go out of synch.

20.3.5.2. Importing a Test Suite from Mercury Quality Center

For importing a test suite from Mercury Quality Center™ into the Squish IDE, select File|Open Test Suite from Quality Center... from the menu bar. A dialog will show up which asks you to enter the name of the Mercury Quality Center™ server you want to connect to as well as the login credentials for the particular project.

A picture of the dialog for importing test suites from the Mercury Quality Center™ into the Squish IDE.
A picture of the dialog for importing test suites from the Mercury Quality Center™ into the Squish IDE.

A dialog like the one shown above will show up, showing all folders and test suites the Squish IDE could find in the given project of the server. Simply select one of the suites and press the button labelled Import to import that suite into the Squish IDE.

[Note]Note

The import dialog will not show all available test suites in the Mercury Quality Center™ database but only those which are stored in a folder called froglogic Squish Tests!

The login credentials used when importing the suite will be stored in the suite configuration file. Whenever you change anything in the test suite (for instance, when adding entries to the object map or when adjusting one of the test scripts), the suite will be uploaded in the background to the server so that it becomes less likely for the two copies to go out of synch.

20.3.5.3. Exporting a Test Suite to Mercury Quality Center

For exporting a test suite which you have opened in the Squish IDE, simply select Test Suite|Export To Quality Center from the menu bar. A dialog will be shown asking you for the server to which the suite should be exported. You will also need to give the information necessary for logging into a project on the server.

After having entered the required information, press the button labelled Connect to Server to connect to the specified project and commence the upload. The dialog will disappear, and the upload of all data belonging to the test suite commences in the background You can see some progress information in the status bar at the bottom of the Squish IDE window.

The login credentials used when exporting the suite will be stored in the suite configuration file. Whenever you change anything in the test suite (for instance, when adding entries to the object map or when adjusting one of the test scripts), the suite will be uploaded in the background to the server so that it becomes less likely for the two copies to go out of synch.