Integrating IBM Rational Functional Tester and IBM Rational Performance Tester with IBM Rational Quality Manager

Comments

IBM® Rational® Quality Manager is collaborative, Web-based, quality management software for comprehensive test planning and test asset management throughout the software life cycle. Built on the Jazz™ platform, it is for test teams of all sizes and supports a variety of user roles, such as test manager, test architect, test lead, tester, and lab manager, as well as roles outside of the test organization.

Rational Quality Manager enables you to manage and run automated test scripts created with other test tools. You can create test scripts that refer to existing tests that were created with IBM® Rational® Functional Tester, Rational Performance Tester, Rational Service Tester, Rational Robot, and Rational AppScan Tester Edition. The test scripts that you create are references to the actual tests created in the other testing tools. This article covers IBM® Rational® Functional Tester and IBM® Rational® Performance Tester as examples. You will see how to get the tools integrated and how they work with Rational Quality Manager to help you better manage and understand the status of your project.

Automated test tools integrate with Rational Quality Manager through the use of adapters that serve as bridges between the test tools and Rational Quality Manager. The adapter responds to requests from Rational Quality Manager by running tests on the test machine where the test tool is installed. When you choose to run an automated test, Rational Quality Manager sends commands to the machines in your test lab or at another network location. Results are displayed in your browser.

In the workflow illustrations shown in Figure 1, you can see how Rational Quality Manager processes automated tests through assets on a machine that is running the test or assets located on a shared server.

Figure 1. Accessing local Rational Functional Tester resources through Rational Quality Manager
image of workflow diagrams
image of workflow diagrams

Both workflows follow these steps:

  1. In Step 1, the tester uses the Web client to choose to run an automated test.
  2. In Step 2, the adapter receives the request and begins running the test on the test machine. If the test resources are shared, then the adapter receives the request and copies the test from the shared location to the functional testing machine.
  3. In Step 3, the test runs on the testing machine, and the adapter sends the results back to the Rational Quality Manager server.
  4. And finally, in Step 4, you can view the test and the test results in the Web client browser.

Integrating with IBM Rational Functional Tester

The functional test adapter is installed by default when you install Rational Functional Tester Version 8.0, and it is configured on the functional test machine. Follow these steps to start the adapter:

  1. Click the startadapter.bat batch file that is installed by default into the ...\IBM\SDP\FunctionalTester\RQMAdapter directory.
  2. This opens the Rational Functional Tester Adapter window shown in Figure 2.
Figure 2. Starting the Rational Functional Tester Adapter
Connection Information tab fields
Connection Information tab fields
  1. Enter the Server URL for the Rational Quality Manager server, Login ID and Password, and specify a unique Adapter Name. The Adapter Name is the name that shows up in the Rational Quality Manager Web user interface (UI) to identify this instance of the adapter.
  2. If you do not want to have to re-enter your password each time you start the adapter, select the Save Password check box.
  3. After you have everything filled in, click Start Adapter.
  4. When the connection is made, the word Connected appears at the bottom of the Rational Functional Tester Adapter window. You can also click on the Adapter Console tab (Figure 3) to see the adapter status.
Figure 3. Checking the adapter status in the Rational Functional Tester adaptere
image of workspace
image of workspace

At this point, things should be integrated and ready to go. To test this, import a sample test case and run a test:

  1. In Rational Functional Tester, create a simple test that logs a passed test result when the test runs.

In Listing 1, you can see the simple script for this test. used for this article. Feel free to use some of your existing test cases when you test your integration.

Listing 1. Logging a test result in RFTTestScriptOne
public class RFTTestScriptOne extends RFTTestScriptOneHelper
{
public void testMain(Object[] args) 
{
logTestResult("This is a test.", true);
}
}

After you have figured out which test you want to use for testing the integration, switch to Rational Quality Manager to test the integration:

  1. Point to the Construction icon, and click Import Test Script as shown in Figure 4.
Figure 4. Selecting “Import Test Script” in Rational Quality Manager
image of workspace
  1. This loads the Import Test Script tab shown in Figure 5. On this screen, select Functional Tester as the Script Type and, under "Use test resources that are local to a test machine," click the Select Adapter button (if that is the setup that you are using, which is what this example shows).
Figure 5. Selecting the script type and adapter to import a test script
Import Test Script view
Import Test Script view
  1. That opens the Import Test Script dialog shown in Figure 6. Enter the path to your Rational Functional Tester project.
  2. After entering the project path, click Next. You will then be able to select the test scripts that you want to import.
  3. After you have selected the scripts, click Finish.
Figure 6. Selecting the test scripts to import
Import Test Script dialog view
Import Test Script dialog view
  1. When you have returned to the Import Test Script page, you will see that the Selected Adapter field is filled out and disabled, as shown in Figure 7. All you need to do on this page is to confirm that you have the scripts you want to import selected, and then click Import.
Figure 7. Confirming the importation of test scripts
Important Test Scripts dialog
Important Test Scripts dialog
  1. When the import is complete, the All Test Scripts tab should open as Figure 8 shows. Search through the test scripts returned until you find the one that you added. As you can see in Figure 8, the test script RFTTestScriptOne was imported successfully.
Figure 8. Confirming that your test script is shown in the All Test Scripts view
Table that lists ID numbers and names of test scripts
Table that lists ID numbers and names of test scripts

After you import the test scripts, you can associate them with test cases. The test scripts become test artifacts in Rational Quality Manager and can be managed like any other script. As with manual test scripts, to run an automated script, you must associate it with a test case and a test execution (test run) record.

The last thing that you must do to make sure that things are working is to run your test from Rational Quality Manager. Make sure that you can launch your tests from in Rational Quality Manager and see the test results there.

With Rational Quality Manager, there are several ways to run automated tests created with other test tools.

  1. The first thing that you need to do is create a reference to the automated test script that you just imported:
Figure 9. Creating a new test case in Rational Quality Manager
Menu with "Create Test Case" selected
  1. When the Create Test Case tab opens, fill in the title for the test case.
  2. Click the Test Scripts section.
  3. In the Test Scripts section, click the Add Existing Test Script button and add the test script that you imported as shown in Figure 10. When you are finished, click Save.
Figure 10. Tying a test script to a test case in Rational Quality Manager
RTF Integration Test view
RTF Integration Test view
  1. After you click Save, the Run Test Case button is active. Click Run Test Case.
  2. In the Run Test Case dialog, click OK to open the Script Execution tab shown in Figure 11. When the script has executed, click the Close and show results button.
Figure 11. Running your Rational Functional Tester test script in Rational Quality Manager
Script Execution test tab view
Script Execution test tab view
  1. In the resulting Execution Result tab, click the Rational Functional Tester Simple Log link. This will open the test results in your browser as shown in Figure 12.
Figure 12. Rational Functional Tester cript execution results
Screen capture of results in table formate
Screen capture of results in table formate

As you can see, Rational Functional Tester is now fully integrated.

Integrating with IBM Rational Performance Tester

Just as with Rational Functional Tester, the adapter for integrating Rational Performance Tester V8.0 is installed by default when you install the tool. However, starting the adapter can be a bit more involved. The adapter can be run in any of these three ways:

  • From within Rational Performance Tester
  • From the command line
  • As a Windows service

To configure the tester adapter in the Rational Performance Tester GUI, follow these steps:

  1. In Rational Performance Tester, select Window > Preferences > Quality Manager Adapter from the toolbar. This opens the Rational Performance Tester-Quality Manager Adapter window shown in Figure 13.
Figure 13. Rational Quality Manager Adapter settings in Rational Performance Tester
Preferences view
Preferences view
  1. Enter the Server URL for the Rational Quality Manager server, and then your Login ID and Password, and type a unique Adapter Name. The Adapter Name is the name that shows in the Rational Quality Manager Web UI to identify this instance of the adapter.
  2. After you have filled in the fields, click Apply and then OK.

Note:
Additional steps are required to run the adapter in command line mode or as a Windows service:

  1. Locate the adapter.config file in the rpt_install_dir \RPT-RST_RQMAdapter\config\ directory, where rpt_install_dir is the directory where the test workbench is installed.
  2. Edit the WORKSPACE_DIR variable in the adapter.config file to point to the same test workspace that you want the adapter to use, for example: WORKSPACE_DIR= C:\Documents and Settings\username\IBM\rationalsdp\my_adapter_workspace.

From there, if you want to run the adapter in command-line mode, follow these steps:

  1. Open a command prompt window.
  2. Switch to the rpt_install_dir \RPT-RST_RQMAdapter\bin\ directory, where rpt_install_dir is the directory where the test workbench is installed.
  3. In Microsoft® Windows, issue either of the following commands:
    • To start the adapter, enter: RQMAdapter.bat START
    • To stop the adapter, enter: RQMAdapter.bat STOP
  4. In Linux®, issue either of these commands:
    • To start the adapter, enter: RQMAdapter.sh START
    • To stop the adapter, enter: RQMAdapter.sh STOP

When operating from the command line, adapter activities are printed to rpt_install_dir\RPT-RST_RQMAdapter\logs\adapter.log. You can also print the current status of the adapter by entering this command: rpt_install_dir\RPT-RST_RQMAdapter\bin\RQMAdapter.bat STATUS.

If you want to run the adapter as a Windows service:

  1. By default, the service is set to start manually. To start the service, open the Windows service manager, right-click IBM RPT adapter for RQM, and click Start (Figure 14).
Figure 14. Starting the Rational Performance Tester adapter service for Rational Quality Manager in Windows
image of menu command
image of menu command

Note:
Optionally, you can configure the service to start automatically by right-clicking the adapter listing, selecting Properties, and selecting Automatic as the startup type. With this setting, the adapter can start automatically when the computer restarts without requiring login.

  1. To stop the service, right-click IBM RPT adapter for RQM, and click Stop.

At this point, everything should be integrated and ready to go. To test this, import a sample test case and run a test.

  1. Similar to what you did for your integration test for Rational Functional Tester, create a simple test in Rational Performance Tester that does something very simply.

In the test shown in Figure 15, the Rational Quality Manager login page is simply loaded on the local machine.

Figure 15. Loading the Rational Quality Manager home page in RPTTestScriptOne
Test Contents on left, Test Element Details on right
Test Contents on left, Test Element Details on right
  1. After you have figured out which test you want to use for testing the integration, switch to Rational Quality Manager.
    1. To test the integration simply follow the same steps that you followed for Rational Functional Tester:
    2. Import the test script into Rational Quality Manager.
    3. After you import the test script, associate it with a test case.
    4. Then run the test to make sure that things are working.

When you run a test script from Rational Quality Manager, the default report that is displayed during a test run is attached to the Rational Quality Manager results. This report can be customized. You can also view the full run results from within the test workbench by opening the test workbench in the workspace that is configured for the adapter to use.

The resulting completion state reported to Rational Quality Manager is based on the overall verdict of the run’s associated test log. In many cases. a test may contain a failed verification point but still qualify as passed. View the attached report in the Rational Quality Manager test result and set the execution results status accordingly.

Tip:
If the adapter is running from the command line or as a Windows service, stop the adapter before opening the test workbench. When the workbench is opened, you can access the full test reporting and test log capabilities. You can find results for runs initiated from Rational Quality Manager under the Rational Quality Manager Results project.


Downloadable resources


Related topics


Comments

Sign in or register to add and subscribe to comments.

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=370949
ArticleTitle=Integrating IBM Rational Functional Tester and IBM Rational Performance Tester with IBM Rational Quality Manager
publish-date=02232009