Highlighted
Super Contributor.. Super Contributor..
Super Contributor..
511 views

Parameters - Different values how to add it in the script

Hi,

I have created a parameter called dataType with values - dataType : KHB, KAN, DBR . iset its as Sequential and each iteration.

I called that parameter in my script- Init () as

var Name="Test_"+ TC.getParam("dataType")+"_" + currentDate + "_"+ currentTime;

Action ()

Type Name in Name textbox

value = Name which is a parameter

But my problem is it always takes first element for all 3 iterations.

I want everytime when it runs (made 3 in runtime settings) it should type Test_KHB (furst time)

Test_KAN(Second Time) etc.

How to solve this.

 

0 Likes
1 Reply
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Parameters - Different values how to add it in the script

Hi,

The Init action runs only once hence it is not affected by the number of iterations.

If you wish different Vusers to get different values you should configure the parameter to be unique.

Regards,

Shlomi

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.