0

I have this structure:

HTTP request
- HTTP Header
- Random Variable (variable name: ranVar)

In HTTP request, the 'body' uses a 'Unique' variable: "id":${ranVar}

Now I want to spread the load across 2 Slaves' IPs. But the problem is that 50% of requests fail because the random variable is the same in 2 requests spread across 2 systems. How can I resolve this?

I have tried by starting the load on 2 systems at the different time, but it doesn't resolve the purpose.

Ori Marko
  • 56,308
  • 23
  • 131
  • 233
TestPro
  • 15
  • 4
  • I don't know anything about Jmeter, but about the random issue: Perhaps you can explain better how this ranVar is generated and how it's used? Can you use something unique there as well, as a Guid? – jpgrassi Dec 13 '18 at 10:32

1 Answers1

0

Keep Random Variable's Random Seed empty and set Per Thread(User)? to True

Random Seed The seed for the random number generator. If you use the same seed value with Per Thread set to true, you will get the same value for each Thread as per Random class. If no seed is set, Default constructor of Random will be used. No

Per Thread(User)? If False, the generator is shared between all threads in the thread group. If True, then each thread has its own random generator.

Community
  • 1
  • 1
Ori Marko
  • 56,308
  • 23
  • 131
  • 233