Quantcast
Channel: All LoadRunner Practitioners Forum posts
Viewing all articles
Browse latest Browse all 12134

Re: TruClient - Parameters - How to add an incrementor in scripting

$
0
0

Hi,

Not sure I understand what you are trying to do. According to your code the outcome is supposed to Test_CurrentDate_CurrentTime and not Test_1_CurrentDate:CurrentTime

If you wish to add an incrementor you can intiialize a global variable at the beginning of the script run in the Init section and then increment it before any use.

Initialization in the Init section should be done in Evaluate JavaScript step like that

Global.incrementor = 0; // No need in var definition before using the Global object

Increment the value before use in the Actions section in Evaluate JavaScript step like that

Global.incrementor++;

(See another example in TruClient help center)

You can then concatenate the value as follows

var parameterName="Test_" Global.incrementor + "_" + currentDate + "_"+ currentTime

Regards,

Shlomi


Viewing all articles
Browse latest Browse all 12134

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>