0
votes

Please suggest the solution for this...

Testplan Given like this:

Thread Group-10 users

+csv data set config

Login

Throughput controller 1- 60%

Request1

Request2

Request3

Throughput controller 2- 40%

Request4

Request5

But After running the test i am getting error- All the samples/requests under the Throughput controller 1 are passing

But All the requests under the Throughput controller 2 are failing.

Because the correlated values are not passing from the requests in Throughput controller 1 to the requests(where i have called) in Throughput controller 2.

Note:If i given same percentage in Throughput Controllers,the test is passing and the correlated values are passing to the other requests.

2

2 Answers

0
votes

You have some values in TC1's requests which are correlated in TC2's Requests. If any of the requests in TC2 needs correlated data from TC1, you should put it out of TC1, i.e your login request. That's because maybe a thread does not win in TC1(is not in 60%) so it doesn't go through TC1, but it win in TC2(is in 40%) and go through TC2, and because it is correlated to the request in TC1 which does not run, so it fails.

Thread Group-10 users

+csv data set config

Login --> Thread_n

Throughput controller 1- 60%

Request1

Request2 ( Provide data named X)

Request3

Throughput controller 2- 40%

Request4 (Needs Data named X) --> Thread_n fails because does not have X

Request5

0
votes

The correlation fails because 60% of users are executing Request 1, 2 and 3 and 40% of users are executing Request 4 and 5

Each JMeter thread (virtual user) holds the variables in its Thread Local Storage, therefore if you have, say, 10 users:

  • 6 of them will execute Login, Request 1, 2 and 3 and exit
  • 4 of them will execute Login, Request 4 and 5 and exit

If you need to pass some correlated values from users which execute Samplers under Transaction Controller 1 to users which are executing Samplers under Transaction Controller 2 you will need to go for Inter-Thread Communication Plugin (it's not a part of JMeter distribution bundle, you will need to install it using JMeter Plugins Manager)