- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

##
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 ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

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

Network Virtualization PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi Peet,

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

Network Virtualization PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

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 )

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi Peet,

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

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

Network Virtualization PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

You can also create a random number parameter then use TC.getParam to populate the wait time value.

I use the same technique to set static wait values. This allows me to quickly change wait/think time values in a script.