jmeterjmeter-plugins

JMeter run http requests consecutively in a ThreadGroup without loop logic


In JMeter, I have 2 Http Requests in a thread group, A and B

If I set Number of threads (users) to 3 in the thread group, they run in the following manner

AAABBB instead of the desired ABABAB

Why I need it AB, because A produces a unique connection ID I need to store in a variable and use in B. Now, all B requests uses the ID of the last A request.

Before anyone suggests it, I know setting users to 1 and loop to 3 will get the job done but in my specific use-case, it is causing errors.

To sum it briefly, I am using Azure signalR. When I am using only 1 user, Azure is only reserving 1 connection. As the loop progress, it closes the i-1 connection and opens it again at i.

So practically, at the end of the test, only 1 connection is open instead of 3.

I am unable to perform a stress test on Azure when there is only ever 1 connection opening and closing in each iteration.

So, how can I run the 2 http requests consecutively while keeping loop 1 and users 3?


Solution

  • Each thread (virtual user) is running requests consecutively, you can check yourself if you add the following functions to your Samplers labels:

    you will see that:

    If you're looking into a listener like View Results Tree and seeing another order - this is due to concurrency and it's totally expected