Automate test cases by integrating Rational Functional Tester with Rational TestManager

A step-by-step guide

Learn how to run automated Rational Functional Tester 8.2.0.1 scripts from Rational TestManager 7.0.2 and view the results in TestManager logs, too, by integrating these two tools. You can even run the scripts remotely, as this guide explains. Note: Rational TestManager has been replaced by IBM Rational Quality Manager, but this article will be helpful to those who are still using the older software.

Share:

Pragati Maheshwari (pragati.maheshwari@in.ibm.com), Software Engineer, I.B.M.

author photoPragati Maheshwari, a B.E. (CSE) graduate, is a software engineer who works with the IBM Rational Functional Tester testing team in India. She joined IBM India Software Labs in September 2006 and has contributed to quality improvement in the testing tools. She has also worked on Rational Quality Management and Rational Team Concert software.



17 May 2011

Also available in Chinese

IBM® Rational® Functional Tester projects can be associated with IBM® Rational® TestManager, and automated Rational Functional Tester scripts can be played back from the test management tool.

Note:
Rational TestManager has been replaced by IBM® Rational® Quality Manager, but this article will be helpful to those who are still using the older TestManager software.

After running the functional testing scripts, you can view from Rational TestManager rather than going back to Rational Functional Tester again. You also gain the advantage of the report generation capability of TestManager to generate the reports about the script's execution. Also, functional test scripts can be played back on a remote computer from Rational TestManager. (This support was withdrawn for Rational Functional Tester Version 8.2 but restored in Version 8.2.0.1).

Prerequisites

  • IBM Rational Functional Tester Version 8.2.0.1
  • Rational TestManager Version 7.0.2
  • TestManager Agent Version 7.0.1.0 (required only for remote use)
  • Java Runtime Engine (JRE) Version 1.6

Running Rational Functional Tester scripts from Rational TestManager requires basic knowledge of both tools and this specific knowledge:

  • How to create a TestManager project
  • How to create a test plan in TestManager
  • How to create test case in TestManager
  • How to create Rational Functional Tester projects and scripts
  • How to associate Rational Functional Test projects and scripts with TestManager projects

Machine configuration if you run scripts remotely

For remote execution, you will need minimum two machines. The master machine is where you trigger the execution of Rational Functional Tester scripts, and the client is the machine where the script actually runs. This is required only for remote execution. We should have one master machine and one or more client machines.

Master machine

  • Rational Functional Tester
  • Rational TestManager
  • JRE 1.6

Client machine

  • Rational Functional Tester
  • TestManager Agent
  • JRE 1.6

Integration setup for Rational Functional Tester and Rational TestManager

The detailed description that follows is for setting up the environment on a master machine and a client machine of the scripts.

Master machine setup

  1. Install Rational TestManager.
  2. Install Rational Functional Tester.
  3. Create a shared TestManager project named TM_P1. Give the Uniform Naming Convention (UNC) path, or the shared network path, for the project location, while creating a project. For example:
    \\<computer name>\shared\TM_Proj
  4. Create a test plan called TP1 and a test case TC1.
  5. Create a Rational Functional Tester project, RFT_P1, and associate it with the TestManager project, TM_P1.
  6. Record a script called S1, and build it.
  7. Associate the TestManager test case, TC1, with that Rational Functional Tester script, S1.
  8. Select Manage > compute lists and add the client machine's name.

Important:
Make sure that the client machine is accessible from the master machine.

Client machine setup

  1. Install the TestManager Agent.
  2. Install Rational Functional Tester.
  3. Start the TestManager Agent.
  4. Start Rational Functional Tester Agent by following these steps:
    1. Open the command prompt and go to the Agent Controller's bin directory: ...\...\IBM\IBMIMShared\plugins\org.eclipse.tptp.platform.ac.win_ia32_4.4.300.v201006031900\agent_controller\bin
    2. Type SetConfig to run the SetConfig.bat file.
  5. Follow these prompts in SetConfig for directions:
    1. Prompt 1: Specify the fully qualified java.exe path. This should be set to the JRE installed with the IBM test product. For example:
      C:\Program Files\IBM\Java50\jdk\jre\bin\java.exe
    2. Prompt 2: Set the network access mode. For example, Use ALL allows any host.
    3. Prompt 3: Set security as enabled or not. For example, Use FALSE does not enable security.
    4. Use the default values on all the rest of the prompts.
  6. Now start the Rational Functional Tester Agent Controller by typing ACServer.exe.

Note:
For non-admin mode scenarios, you need to do this setup in administrator mode and then log in as a non-admin user who has most of the privileges that the administrator does.


Three different integration options

There are different ways to execute Rational Functional Tester scripts from Rational TestManager.

Note:
All three of these scenarios can be executed in non-admin mode, too.

1. Local execution of Rational Functional Tester script through Rational TestManager

  1. On the master machine, launch TestManager and Rational Functional Tester.
  2. Open the TestManager test case, TC1, that is associated with Rational Functional Tester script, S1.
  3. From the test case drop-down menu, select Run to start executing the Rational Functional Tester script (you will see the Playback monitor).
  4. You can check the log for results.

2. Remote execution of a Rational Functional Tester script through Rational TestManager

  1. On the master machine, launch TestManager and Rational Functional Tester.
  2. Open the TestManager test case, TC1, that is associated with Rational Functional Tester script, S1.
  3. From the test case drop-down menu, select Run.
  4. In the Run Test Case wizard, change the computer name as the client machine name.
  5. Execution of Rational Functional Tester script will start on the client machine, and the Playback monitor will appear.

You can check results on the master machine after the script has run.

3. Remote execution of scripts on multiple client machines

Here, you would have one master machine and multiple client machines.

  1. Add all of the client machines' names in the computer list.
  2. Open the TestManager test case, TC1, that is associated with Rational Functional Tester script, S1.
  3. From the test case drop-down menu, select Run.
  4. In the Run Test Case wizard, select your different computer names as client machine names.
  5. Execution of Rational Functional Tester script will start on the client machines, and the Playback monitor will come up.

The log on the master machine will show after the script has run.


Hands-on experience for Option 2

Begin by launching the Rational Administrator tool that installs with Rational TestManager.

Create a new project

  1. From the Projects drop-down menu (see Figure 1), and select the New Projects option.
Figure 1. Creating a new project
Projects, then New Project selected
  1. Type TM_P1 as the name of the project as and browse to provide a UNC path as the location:
    \\<Computer name>\Shared\TM_Proj
Figure 2. Project creation for TestManager
Enter project name and location
  1. Click Next > Next > Finish.

Configure the project

  1. In the Configure Project wizard, click the Create button.
Figure 3. Project configuration
The Configure Project window
  1. Select the type of the database to create for the test datastore, and click Next.
Figure 4. Choose the type of test database to create
Create Test Datastore window, 1 of 4
  1. Give the UNC path for the datastore, and then click Next > Next > Finish.
Figure 5. Datastore path
Database settings

You will get a confirmation message like the one shown in Figure 6 when the datastore has been successfully created.

Figure 6. Datastore confirmation message
The Test Datastore has been successfully created

Connect the projects

  1. From the project drop-down menu, select the Connect option.
Figure 7. Connect project
Connect the project
  1. Launch Rational Functional Tester.
  2. Create a Rational Functional Tester project with RFT_P1 as the name (see Figure 8).
  3. Give the UNC path as the project location.
  4. Also check the Associate the project with current Rational TestManager Project check box and then click Finish.
Figure 8. Create a Rational Functional Tester project
Project creation window
  1. Record a Rational Functional Tester script called S1 in the classicsJavaA application.
Figure 9. Functional Test project explorer
Explorer view after project is created

Add a client computer

  1. Now launch IBM Rational TestManager, select Tools > Manage > Computers (Figure 10), and then click the New button.
Figure 10. Add a client computer
Add the client machine to the list
  1. Give the network name of the client machine, and click the Ping button to check the access. When the ping succeeds, click Apply and then OK.
Figure 11. Enter the name of the client machine
Computer Properties window

The client machine is now added to the master machine.

Figure 12. Computer list
Manage Computers window shows client machine added

Create a new test plan

  1. From the drop-down menu of Test Plan, select NewTest Plan.
Figure 13. Create new test plan
Test Plan menu
  1. Type TP1 as the name of the test plan, and click OK.
Figure 14. Test plan configuration
Enter the name of the test plan
  1. Under Test Plans, double-click TP1 to open the test plan.
Figure 15. Open the test plan
Open the test plan

Insert a test case and associate the test case with the test script

  1. From the drop-down menu of test plan, select the Insert Test Case Folder option to start adding a test case.
Figure 16. Insert Test Case Folder
TP1 Test Plan view
  1. Name the Test Case folder TC_Folder, and click OK.
Figure 17. Create a test case folder
New Test Case Folder window
  1. From the drop-down menu of the test case folder, select Insert Test Case.
Figure 18. Insert a test case
Add a test case into test case folder
  1. Name the test case TC1, and click the Implementation tab.
Figure 19. Enter the name of the test case
New Test Case window
  1. Click the Select button and select the associated Rational Functional Tester project name, RFT_P1.
Figure 20. Associate the test case with the Rational Functional Tester script
Test Case Properties window
  1. Select the functional test script name, S1, which you need to associate with the TC1 test case, and click OK.
Figure 21. Select the functional test script
Select Script File view

Now the functional test script, S1, is associated with the TestManager test case, TC1.

Execute a test case

  1. Select TC1 and then select Run to execute the test case from the test case drop-down menu.
Figure 22. Select and run the test case
Start the execution of the test case
  1. Select the test case that you want to run, change the computer name to the name of the client machine (see Figure 23), and click OK.
Figure 23. Execution of the test case
Run Test Cases window

Script execution will start on the client machine, and the result will display on the master machine in the log (Figure 24), which shows Event Type, Result, Date and Time, Failure Result, and Computer Name.

Figure 24. Log
Test Log, TC1

Larger view of Figure 24.

From the Rational TestManager log (Figure 25), you can also view the Rational Functional Tester script and verification points by right-clicking to select the options from the drop-down menu.

Figure 25. View script and verification points
Click Open Script to view the verification point

Larger view of Figure 25.


Troubleshooting

If either of these errors occur, you can resolve it easily yourself.

Error message 1

Playback monitor is not appearing in the client machine but log shows script pass.

Solution:
Make sure that JRE is properly enabled for Rational TestManager and Rational Functional Tester.

Error message 2

RTagentd: fatal system initialization error: [5.3.8.43] server: bind error (10048), Invalid argument (shown in Figure 26).

Figure 26. Test Agent error notice
Pop-up error message

Solution:

  1. Select Run and start services.msc.
  2. Check the status of the IBM Rational Test Agent Service.
  3. Stop the IBM Rational Test Agent Service.
  4. From the Start menu, start IBM Rational Test Agent.
  5. Restart the Test Agent Service.

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Rational software on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=658645
ArticleTitle=Automate test cases by integrating Rational Functional Tester with Rational TestManager
publish-date=05172011