We have recently started using truClient, but we have problems when it comes to multiplying wait time (Like the functionality for multiplying think time in http web scripts). The only value we can find is "wait time", but there is no "multiply wait time" setting in runtime settings in Performance Center.
We thought about having an external param file and using a value there as base for multiplying think time, but I'm not sure this is very ideal. Is there a "best practice" way to multiply wait-time in truClient scripts ?
1) From ‘Toolbox’, copy a wait function and paste it before the web request. 2) In the argument section, replace the interval value ’3′ by ‘Math.floor(11*Math.random()+5);‘
The above function will return a random number between 5 and 15.
Math.floor() method rounds a number DOWNWARDS to its nearest integer. (Eg. The output of code ’Math.floor(1.8);‘ is 1). Hence 11 is used as a multiplication factor so that an integer in the upper decimals of 10 will be rounded to 10. Math.random() method returns a random number between 0 and 1.
This indicates that I can use the minimum time in the runtime settings to configure a think time.
Is this correct?
I surely would like to be able to use this as adding an additional wait step is a pain when scripts become long, it also degrades the readability of the script.