0 Shares 1024 Views

All about Test Combinations Generator in UFT

Jun 12, 2017
1024 Views
Test Combination Generator

Test Combinations Generator

With UFT 14.0, HPE has added a new feature in UFT Feature stack – Test Combination Generator (let’s call it TCG). Test Combinations Generator provides you the capability to create multiple test data combination for your application to test. This feature provides real benefits for Business Process Tests, however you can also use in GUI tests.

While working with Test Combination Generator in one of my project, I found a minor bug, refer  Found a flaw – UFT 14

When Should I use Test Combinations Generator?

TCG should be used in a scenario where you have multiple parameters with multiple values for a test. In such case, TCG would generate the maximum possible combination of values for the parameter. This is very helpful when you have test with multiple combination of data for a single test case. Here is an example to understand it better, refer the flight reservation sample application. One of the process flow would be –

Log in >> Find Flights >> Book a Flight >> Confirmation

Let’s see different data combinations on Find Flights page

 

Field # Combinations
Type 2
Passenger 4
Departing from 10
Arriving In 10
Service Class 3
Airline 4
2 x 4 x 10 x 10 x 3 x 4 = 9600

More than 9000 combinations of data required to test this flow. Note that, we have not considered the dates yet, it will be more if you include those as well. Writing such combinations is, too time and effort consuming and not a wise idea at all. TCG feature is going to do the magic and make our life easy.

 How Does Test Combinations Generator Work?

TCG Works on Optimization algorithms. With the preferred algorithm chosen, it generates the best suitable combination which would be sufficient to cover the process flow. There are three algorithm available to choose from –

Pairwise – algorithm is an effective combinatoric test generation technique that can generate relative small test suite to cover all pairs of parameter values at least once. As name suggests, it takes pairs at a time for comparison.

Linear – algorithm is to achieve the best outcome. It’s a technique for the optimization of a linear objective function, subject to linear equality and linear inequality constraints. Which means the outcome will be a set of combination which intersects across all different combinations.

Triplewise – is likely to be the same as pairwise with the difference as it takes triplets at a time for comparison.

To start using Test Combinations Generator, ensure that you have test parameters created.

 

Step 1 Open Test Combination Generator

Test Combination Generator

 

Step 2 Provide possible values for Parameters

UFT displays test parameters in TCG main window, you should enter the possible values for these parameters. Here can specify the values as HAPPY PATH or ERROR PATH.

Happy Path – values are not expected to cause an exception or error in the application. I feel, in other way it’s actually Value for Positive Testing

Error Path – values are expected to cause and exception or error in the application, other way Value for Negative Testing

There are other options you will find at the right of window

Generate Parameters – Helps you to populate random data for specified types like Full Name, Email, URL, Passwords etc.

Import and Export options lets you import or export values for your Parameters.

 

Step 3 View Combinations

Click on View combinations, UFT display possible combinations based on the possible values supplied for test parameters. 

By default, Pairwise algorithm is selected. You can switch to other algorithms Liner or Triplewise. All three will display different set of combinations.

Interesting fact to know here is even though if the number of combinations is huge, UFT can only generate and display maximum 1000 combinations.

 

Step 4 Generate 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.

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.

 

That was all for TCG in this post, Let us know how does it work for you. We will continue to explore more and update on new and advanced features of UFT, Stay tuned.  

You may be interested

Setting up Mobile Automation Project in Windows
Katalon Studio
77 views
Katalon Studio
77 views

Setting up Mobile Automation Project in Windows

Saket - Sep 20, 2017

This tutorial explains how to setup a mobile automation project and test a mobile app using Katalon Studio on Windows. This tutorial assumes that you are familiar…

Katalon Studio GUI Overview
Katalon Studio
147 views2
Katalon Studio
147 views2

Katalon Studio GUI Overview

Saket - Sep 14, 2017

GUI Overview After installing and setting up Katalon Studio for your automated test, you must understand the GUI. In this post we will walk you through the…

LeanFT Tutorial #4: Application Model Overview
LeanFT
124 views1
LeanFT
124 views1

LeanFT Tutorial #4: Application Model Overview

Saket - Sep 10, 2017

In this post we are going to focus on Application Model in LeanFT. Refer our earlier posts on LeanFT Getting Ready with LeanFT Browser Extensions and Settings…

Leave a Comment

Your email address will not be published.

Most from this category

Join The Growing Group of 15000+ Test Automation Engineers

Signup for our newsletter and get access to free downloads, as well as tips, tricks and techniques and various test automation resources.
Name
Email Address
Secure and Spam free...