Highlighted
Absent Member.
Absent Member.
332 views

Editing Additional Attributes in run-time-settings

Hi all,

How can i edit the value of the an attribute which is added in the 'Additional Attributes' in run-time-settings during runtime.

Let's say i have an additional attribute 'val' and it's value is 'ON'. So when i use the function lr_get_attrib_string("val") from the script i get the value 'ON'. After running certain vusers(let's say 25) i want to change this value to 'OFF', so that when i try using the function lr_get_attrib_string("val") (from my 26th vuser) i should get the value 'OFF' in my script.

Is this possible? i tried and could not find a function which sets a value to the parameter in the 'Additional Attrubutes' in run-time-settings.

Kindly help.
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

Re: Editing Additional Attributes in run-time-settings

i don't think we can change during test execution.

Thanks,
Christo
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Editing Additional Attributes in run-time-settings


thanks christo for ur comments. Christo is there any way by which i can set a global value or dynamic value in the script which changes during runtime and remains same till the script gets executed or till the vusers assigned by the controller gets executed..

For example, i have a run time attribute "run_val" or my variable name is 'run_val'. Now this attribute has a value '1'. When i run the script i check whether the vuser count exceeds 25 vusers. if so i increment the run_val to 2.

Now this val will remain the same till all the vusers are finished.


I am not able to set a run time attribute or a global variable due to this. Because in controller as the vuser_init,action and vuser_end runs every time for each vuser, the value changes to old.

Is there any work around for this..?
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Editing Additional Attributes in run-time-settings

yes, you can do that in global.h

refer the screen-shot.

Happy scripting....

Cheers,
Christo
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.