Unanswered question

Can I reuse the same scripts in different scenarios with different pacing?

In tools like LoadRunner, scripts know nothing of how they will be used in a scenario. Runtime settings are defined when creating the scenarios.

I'm trying to set up a set of transaction based tests, each of which will use the same scripts, but the numbers of users and pacings need to be different. For example, I have a normal load test, for a given number of users, each running a number of iterations per hour. I also have a peak load test where I have a different number of users running a different number of iterations per hour.

So far, I can only set the pacing of each script in the User Paths tree. Is it possible to define pacing for each population in the Runtime settings? If not, then I'm going to have to duplicate all of the scripts, simply to alter the pacings, which makes the whole thing unmaintainable because a script change would have to be duplicated in many places.

David P.
David P.

David P.

Level
0
12 / 100
points

Answers

You can use variables for your pacing and set them based on the population that will be started.

To get the population name you can use a Javascript with that method:

var myVar = context.currentVU.getPopulationName();
context.variableManager.setValue("MyPop",myVar);

You can create multiple variables that you can call this way: ${Pacing_${MyPop}} where ${MyPop} will get its content from the Javascript above. For instance, you can create those variables: Pacing_Pop1, Pacing_Pop2 etc...

Also starting from NeoLoad 6.1.xx, you will be able to set variable values as an optionĀ  when you start a test through command line. It can be useful in your case with the procedure above without using any Javascript.

David P.
David P.

David P.

Level
0
12 / 100
points

Thanks for the suggestion, which makes sense based on the way NeoLoad seems to work. However, I don't understand why user paths (scripts) need to know anything about the scenarios in which they will run. Scripts should be building blocks, which have the ability to be included and configured within scenarios, not the scripts. Scenarios should be where items like numbers of users and required throughput should be defined.