LoadRunner Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

TruClient - Multiply wait time

Highlighted
Collector

TruClient - Multiply wait time

Hi,

 

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 ?

7 REPLIES
Regular Advisor

Re: TruClient - Multiply wait time

[ Edited ]

I found this useful link from http://www.perftesting.co.uk, hope it helps.

 

End-user behavior is unpredictable and as a performance test engineer, while executing a performance test, our aspiration should always be to reach closest to the real time scenario. Some end users may spend only 2 secs before navigating to next page, while many others may think for more time. Hence in many test scenarios, it would not be ideal to insert a fixed think time value before a web request; rather one must use random think time in such cases. This can be done using advanced javascript functionalities and these are the steps -

 

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.

 

Good luck

 

 

HPE Expert

Re: TruClient - Multiply wait time

Why not using Minimum Time feature (described in the User Guide)?

Guy Rosenthal
Network Virtualization PM
Frequent Advisor

Re: TruClient - Multiply wait time

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.

 

It's a pity that the steps minimum time does not support parameterization. I would like to either use a parameter or a javascript variable for this. That does not work in VUgen 11.52 using firefox TruClient.

Will this be possible in future releases?

 

Thank,

Peet

HPE Expert

Re: TruClient - Multiply wait time

Hi Peet,

Thanks for yourfeedback, we'll consider adding this ability in our future releases.

Guy Rosenthal
Network Virtualization PM
Valued Contributor

Re: TruClient - Multiply wait time

Maybe try something like this?

 

// wait 1-3s
//Math.round( Math.random() * (max - min) + min )
Math.round( Math.random() * (3 - 1) + 1 )

// wait 5-10s
//Math.round( Math.random() * (max - min) + min )
Math.round( Math.random() * (10 - 5) + 5 )

Frequent Advisor

Re: TruClient - Multiply wait time

Hi Guy,

 

But is my first assumption correct? Can I use this as a think time?

And will the transaction response times measured during test then include or exclude this minimum step time?

If it is included, can I filter it out during analysis of the test results?

 

Regards,

Peet

HPE Expert

Re: TruClient - Multiply wait time

[ Edited ]

Hi Peet,

You may find this article useful regarding your first question and in general:

http://h30499.www3.hp.com/t5/HP-LoadRunner-and-Performance/Times-timing-and-timeouts-in-TruClient/ba-p/6409810

 

This is indeed can be filtered in the analysis as think time.

 

 

Guy Rosenthal
Network Virtualization PM