Re: One Test but slightly different teststeps. Please Help. (193 Views)
Reply
Occasional Contributor
giga-daimler
Posts: 6
Registered: ‎11-12-2013
Message 1 of 5 (239 Views)

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

 

 

Please use plain text.
HP Expert
vzamoraz
Posts: 502
Registered: ‎04-12-2012
Message 2 of 5 (211 Views)

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

Hi Giga,

 

  Randomly or you want to indicates which one?

 

regards

Please use plain text.
Occasional Contributor
giga-daimler
Posts: 6
Registered: ‎11-12-2013
Message 3 of 5 (203 Views)

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.

Please use plain text.
Esteemed Contributor
William Schmitt
Posts: 337
Registered: ‎04-02-2008
Message 4 of 5 (193 Views)

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.

Please use plain text.
HP Expert
vzamoraz
Posts: 502
Registered: ‎04-12-2012
Message 5 of 5 (189 Views)

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.

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation