Purpose

This tool mentor describes how to use Rational TestManager to design a functional or performance test suite.

This section provides links to additional information related to this tool mentor.


Overview

A suite shows a hierarchical representation of the task and of the workload that you want to run and test. It shows such items as the computer groups, resources assigned to each computer group, which test scripts the computer groups run, and how many times each test script runs.

This tool mentor is applicable when running Microsoft Windows 98/2000/NT 4.0.

Tool Steps

To design an automated test suite using Rational TestManager, you need to perform these steps:

  1. Create a suite
  2. Insert user groups into a suite (for performance testing only)
  3. Insert computer groups into a suite
  4. Insert test scripts into a suite
  5. Insert other items into a suite 

1.   Create a suite To top of page

A suite enables you to not only run test scripts,  but more importantly,  to emulate the actions of virtual testers using  a system. A suite can be as simple as one virtual tester executing one test  script, or as complex as hundred of virtual testers in different groups, with  each group executing different test scripts at different times using different  resources.

You can create a suite in several different ways:

  • Using the performance testing suite wizard
  • Using the functional testing suite wizard
  • Based on an existing suite of any type
  • Based on an existing Robot session
  • Using a blank performance testing suite
  • Using a blank functional testing suite

To create a new suite using any of these methods, click File > New Suite.

Note: When you create a new suite using the wizards, you must have valid test scripts available for use in the suite.

Help icon   Refer to the topic titled Creating a Suite in Rational TestManager online Help.

2.   Insert user groups into a suite (for performance testing only) To top of page

A user group is the basic building block for all performance testing suites. A user group is a collection of virtual testers that perform the same activity.

  • To insert a user group into a suite, from an open suite, click Suite > Insert > User Group.
  • Set the User count as follows:

Fixed-Specifies a static number of virtual testers. Enter the maximum number of virtual testers that you want to be able to run.

Scalable-Specifies a dynamic number of virtual testers. Type the percentage of the workload that the user group represents.

  • Set computers as follows:

The default computer is the TestManager Local computer, but you can specify that the user group runs on any defined computer.

Note: Copy any custom-created external C libraries,  Java class files, or  COM components necessary for the test to the Agent computer.

  • You can also distribute the virtual testers among multiple computers.  To  distribute the virtual testers in a user group among multiple computers, click Suite > Insert > User Group, and then click Multiple Computers.

Help icon   Refer to the User groups into a suite topic in Rational TestManager online Help.

3.   Insert computer groups into a suite To top of page

A computer group is the basic building block for all functional testing suites.  activity of implementing your tests is primarily creating reusable test scripts. A computer group is one or more computers, or computer lists, running the same test scripts and, therefore, testing the same application.

  • To insert a computer group into a suite, click Suite > Insert > Computer Group.
Note: When adding computer groups to suites,  you can specify either one  computer group for which to prompt for resources  at runtime, or numerous computer groups to prompt for resources at runtime.  You cannot mix the following within a suite: computer groups with specific  resources, and computer groups without specific resources. 
  • To distribute the virtual testers in a computer group over multiple computers, click Suite > Insert > Computer Group, and then click Change.

Note: The benefit of doing this is it saves time by running virtual testers simultaneously on different computers.

Help icon   Refer to the computer groups into a suite topic in Rational TestManager online Help.

4.   Insert test scripts into a suite To top of page

To run the test script from an open suite, select computer groups for functional testing or user groups for performance testing, then click Suite > Insert > Test Script.

You need to make the following decisions:

  • Test script source-this is where you chose the types of scripts, such as GUI, VU, VB, Java, and so forth.
  • Query-here you choose the type of query you'll use to search for  a script or adapt a new one.
  • Precondition-this is a reminder of the suite sequence, which means that the test script, suite, or test case must complete successfully during the suite run for subordinate items in the suite sequence you'll run.
  • Iterations-how often will the selected script be repeated?
  • Scheduling method-this shows you condition of items, whether they're available or pending.

Note: You cannot mix GUI and VU test scripts in a user group. You can, however, mix other test script types.

Help icon   Refer to the topic titled test scripts into a suite in Rational TestManager online Help.

5.   Insert other items into a suite To top of page

A suite requires only computer groups and test scripts to run. However,  a suite that realistically models the work that actual virtual testers perform is likely to be more complex  and varied than this sample model. A realistic  suite might also contain test cases, subordinate test suite, scenarios, selectors (for performance testing only), delays, synchronization points, and transactors  (for performance  Testing only) to represent a variety of virtual testers' actions.

Other items you can insert into a suite include:

  • Inserting a test case
  • Inserting a suite
  • Inserting a scenario
  • Inserting a selector (for performance testing only)
  • Inserting a delay
  • Inserting a transactor (for performance testing only)
  • Inserting a synchronization point

Help icon   Refer to the topic titled other items into a suite in Rational TestManager online Help.

Inserting a test case

  1. To insert a test case into a suite, from an open suite, click Suite > Insert > Test Case.
  2. Preconditions can be applied to test cases too. Right-click the test case, then select Run Properties

Note: A test case can be considered configured, depending on its properties.

Inserting a suite

To insert a suite into a suite, from an open suite, click Suite > Insert > Suite.

Note:  You cannot place a user group-based performance suite into another suite. In addition, computer group-based functional suites placed into a suite must have been created with the Prompt for Resources option selected for the computer group.

Inserting a scenario

A scenario lets you group test scripts together so they can be shared by more than one user group. If you have a complicated suite that uses many test scripts, grouping the test scripts under a scenario has the added advantage of making your suite easier to read and maintain.

  1. To create a new scenario, from the Scenarios section of the suite, click Suite > Insert > Scenario.
  2. To insert a scenario into a suite, click where you want to place the scenario, then click Suite > Insert > Scenario.

Note: Before a scenario is added to a user group, it's a good idea to populate the scenario. A scenario requires only test scripts to urn. However, like a user group, a realistic scenario may also contain selectors, delays, synchronization points, and transactors. A scenario can even contain other scenarios.

Inserting a selector (for performance testing only)

A selector provides more sophisticated control than running a simple sequence of consecutive items in a suite. A selector tells TestManager what items each virtual tester executes and in what sequence.

To insert a selector into a suite, select the computer group or scenario that will contain the selector, then click Suite > Insert > Selector.

The types of selectors include:

  • Sequential-runs each test script or scenario in the order in which it appears in the suite.
  • Parallel-distributes its test scripts or scenarios to an available virtual tester (one virtual  tester per computer)
  • Random with replacement-the selector runs the items under it in random order and each time an item is selected, the odds of it being selected again remain the same.
  • Random without replacement-the selector runs the item under it in random order, but each time an item is selected, the odds change.
  • Dynamic load balancing-with this items are not selected randomly. Items are selected to balance the workload according to the weight that has been set. You can balance the workload either for time or for frequency.

Inserting a delay

A delay tells TestManager how long to pause before it runs the nest item in the suite.

To insert a delay into a suite, click the computer group (for functional testing), user group (for performance testing), scenario, or selector to which to add a delay, then click Suite > Insert > Delay.

Note: You can insert a delay into a suite or test script. The advantages of inserting a delay into a suite are that the delay is visible in the suite and the delay is easy to change without editing the test script.

Inserting a transactor (for performance testing only)

A transactor tells TestManager the number of tasks each virtual tester runs in a given time period.

To insert a transactor into a suite, select the user group or selector to contain the transactor, then click Suite > Insert > Transactor.

The transactor can be one of these two types:

  • A coordinated transactor, which has built-in synchronization points and lets you specify the total rate you want to achieve.
  • An independent transactor, which lets each virtual tester (VT) operate independently. It does not coordinate the VT under it with a built-in synchronization point.

A transactor can have one of two rates:

  • Total rate-for a coordinated transactor, you generally select this rate.
  • User rate-for an independent transactor, you must select this rate.

 You have three choices of distribution for a transactor:

  • A constant distribution means that each transaction occurs exactly at the rate you specify.
  • A uniform distribution means that, over time, the transaction averages out to the rate you specify although the time between each transaction is constant.
  • In contrast, a negative exponential distribution changes the probability of when a transaction starts. This distribution most closely emulates the bursts of activity followed by a tapering off of activity that is typical of VT behavior.

Inserting a synchronization point

A synchronization point lets you coordinate the activities of a number of VTs by pausing the execution of each VT at a particular point, called the synchronization point.

To insert a synchronization point into a suite, click Suite > Insert > Synchronization Point.

Synchronization points settings include:

  • Together-releases all virtual testers at once.
  • Staggered-releases the virtual testers one-by-one.
  • Timeout-means that this period of time for a synchronization point specifies the total time that TestManager waits for VTs to reach the synchronization point. The timeout period begins when the first VT arrives at the synchronization point.

 

Rational Unified Process   2003.06.13