There are a couple of sources for random in LoadRunner scenarios:
rand
() function- Random think time deltas (runtime settings)
- Random pacing time components (runtime settings)
- Random parameters (as part of the VUGen test)
I use those functionalities, and I could live with their pseudorandomness. I cannot, however, live with the fact that all scenario runs containing at least one of those functionalities behave pseudorandomly AND indeterministic, i.e. for a given start state (random seed), I want two runs to generate EXACTLY the same load, including timing (pacing and think times). So I want two runs to be based on EXACTLY the same random sequences. That means that I want to seed all random generators myself, as part of the initialization of each run.
I can use srand
() to set a seed value for rand
(). Setting a specific (hard-coded) seed value upon init always results in the same sequence delivered by rand
() -- for all virtual users. If I seed with the VUser ID number, I would even get different rand
() sequences for every vuser, while they still are the same from run to run for each user.
What about the other pseudorandom sources in LR, those beyond rand
()?
Do I have a chance to seed them all so I get deterministic scenario behavior?
I think that would greatly help.
Without a mechanism like that, one has to plan for very long, and/or very high-traffic test scenarios in order to "average out" the randomness in the results statistics (do you agree with this?) which I do all day.