Unanswered question

Can I add different values to different virtual users?

I want to create an excel file(or another file as long as it works) with different values. Say I have User_Id: 1, 2, 3, 4, 5 etc.

When I create a script via the record method I use ID 1. When I play back or create a load with 20 users all 20 users use ID 1.

I want to be able to use the excel file and have each virtual user go through the list and use a different user_id(value) so not all tests are the same.

Is there a way to do that and if so can anyone provide samples?

Donny D.
Donny D.

Donny D.

Level
0
2 / 100
points

Answers

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

If you would like to distribule your values among your virtual users you should configure your variable with any of this settings depending on your needs: Global/Sequential or Global/Any or Global/Random.

Then the change policy is more important but it depends on where you use your variable and how you designed your virtual users.

If your value is used within the Actions container then the change policy would be "on each iteration". If it's on Init or End container, the change policy would be "For each virtual user".

The big difference between these two change policies is for the former a new value will be assigned on each iteration of the VU and this for all your virtual users instances when with the latter the virtual user will use one value for the entire test.