Unified Functional Testing Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

One Test but slightly different teststeps. Please Help.

Occasional Contributor

One Test but slightly different teststeps. Please Help.

[ Edited ]

Hello,

im using HP UFT 11.5 and HP ALM. I need to construct one big test of a java application with the following critical condition:

In some points in the test i need to choose different elements from a list. For example i want the test to pick Element X from the list, whereas in another testrun i want the test to pick Element Y.  My question is how can i

1) create such a test in HP UFT

2) control before a testrun which Element to pick

 

Thank you in advance

 

 

4 REPLIES
HPE Expert

Re: One Test but slightly different teststeps. Please Help.

Hi Giga,

 

  Randomly or you want to indicates which one?

 

regards

Highlighted
Occasional Contributor

Re: One Test but slightly different teststeps. Please Help.

Hello,

thanks for your reply.

 

I want to indicate which one to choose. No randomization.

 

Looking forward for your answer.

Esteemed Contributor

Re: One Test but slightly different teststeps. Please Help.

The proper way is to use a data table.  The data table would contain one or more fields where you can enter the element that you want to use for each iteration of the test.  When you run the test, it will iterate through the data table, one row at a time, and enter the parameter value into where ever you need it in the test.

HPE Expert

Re: One Test but slightly different teststeps. Please Help.

Totally Right, using UFT Datatable you can save each value you want to select for the iteration this is the best way

 

Also if you don't want to use datatable and what you want is just type your selection manually during runtime you can use inputtext before execute the lines to choose the element.

 

myvariable = inputbox ("type the element you want to select")

 

Regards.