Use-Case Scenario: Use the Test Combinations Generator

Relevant for: GUI tests and business process tests

Suppose you have a desktop application used for flight reservations. You want to create a business process test of this application.

You must test how the application performs with different sets of data. However, you have up to five fields that users can change, and the possible number of combinations is huge, and manually creating these data combinations is going to take too much time.

Use the Test Combinations Generator to help you create this large set of data and make test coverage more manageable.

You've created the following business process test, with multiple components.

Component Area of Application
Login Login window
FlightFinder Page Window to specify flight details (departure, arrival, etc.)
Select Flights Page Window to select an available flight
Flight Confirmation Page Window to book the flight with customer details.

For this scenario, we will focus on the FlightFinderPage component.

In the FlightFinderPage component, you have four different parameters, representing the fields a user can select.

For each of the fields, there are different numbers of possible values:

  • For the Departure and Arrival fields, there are 10 possible values.

  • For the Class field, there are 3 possible values.

  • For the Tickets field, there are 99 possible values.

If you were to manually created every possible combination, you would have to create 10 X 10 X 3 X 99 combinations - a huge total of 29700 combinations.

Use the Test Combinations Generator to generate the combinations automatically.

  1. Provide the possible parameter values.

    After opening the Test Combinations Generator in the Test Configurations pane (for a business process test) or the toolbar (for a GUI test), UFT displays the parameters in the Test Combinations Generator main window.

    You enter the possible values for each of the parameters.

    Tip: If you click Generate Parameters in the upper left corner of the Test Combinations Generator window, UFT can automatically generate parameter values for these parameters (depending on the required format of the value).

    You could specify some of the values as Happy Path values (meaning that they are not expected to cause an exception or error in the application) or Error Path (meaning that the values are expected to cause an exception or error).

    For this scenario, we are not going to specify any values in this manner.

    Note: Although technically you can enter any number up to 99 in the Tickets field, realistically most users will not use all these numbers. So for testing purposes you can limit it to tickets from 1 until 10.

  2. View the value combinations.

    Now that you have all the possible values entered, UFT can generate possible combinations for these parameter values. Once you click the View Combinations, UFT displays possible combinations.

  3. Change the combination algorithm.

    By default, when you displayed the possible combinations, UFT selected the Pairwise algorithm, resulting in 112 combinations.

    You can switch to either the Linear or Triplewise to display other combinations.

    In this case, because the total number of combinations when using Triplewise or Linear algorithms is huge, the Pairwise algorithm is the one to select.

  4. Generate the configurations.

    Now that you have entered the parameters and selected the algorithm to use, you can generate the different combinations.

    First, instruct UFT which configurations to generate. If you click Filter, you can choose from Regular Path (the standard combinations), Happy Path, or Error Path combinations:

    For this scenario, you only need the Regular Path configurations.

    Then, in the bottom part of the Test Combinations Generator, click Generate. UFT pauses for a bit, generates the combinations and adds them as a new test configuration in the Properties pane.

    This test configuration can now be used in any test run.

See also:

Generate test configurations