2

Recently I'm new to JMeter, I have 9 HTTP requests and I want to make sure all the threads must run accordingly in order to complete the whole task in my project. Moreover, I do not think, that adding a synchronizing timer is the best answer to suit in my scenario. Right now I have 100 threads, ramp-up period is 1 second, forever loop until 10 mins. The problem occurs like this:

HTTP request 1
HTTP request 2
HTTP request 3
HTTP request 5 <--- Must complete HTTP request 4 first. otherwise got problems in my system.
HTTP request 4 
HTTP request 6
HTTP request 7
HTTP request 8
HTTP request 9

HTTP request 4 might take sometimes, because that step is actually registration part.

What I want to achieve HTTP request 1 - 9 accordingly. So that my system will register the user correctly.

I hope, that my explanation can give you more clearer image.

2 Answers 2

3

JMeter runs Samplers upside down (or according to Logic Controllers) to wit given the following Test Plan:

enter image description here

Each JMeter thread will always execute Request 1 first and then Request 2

When you have > 1 thread (virtual user) you may see that request order is broken, however if you add __threadNum() function as the request prefix/postfix you will see that actually each thread executes samplers in the order they appear in the Test Plan:

enter image description here

If you experience issues with number of threads > 1 it indicates a problem with your test plan, i.e. you forgot to add HTTP Cookie Manager or the clash is due to missing or improperly working correlation (handling of dynamic parameters)

2
  • Hi, sorry for the late reply, I am still having the same issue where the request 5 happen before request 4. Do you think that the network and my backend system to handle the request might delay the request? So if request 4 is processing while jmeter is sending request 5 as well. Somehow request 5 has done whereas request 4 still processing. Do you think something like this will happen? If yes, how can i solve it without using synchronizing timer.
    – Drew
    Jan 14, 2019 at 6:05
  • Does jmeter wait for the proper request in each iteration while other iterations running smoothly?
    – aj go
    Jun 29, 2021 at 7:51
0

Could you rename your requests by adding "Thread ${__threadNum}" prefix to your "Request 1", "Request 2", etc so they will look like etc into "Thread ${__threadNum} Request 1", "Thread ${__threadNum} Request 2", etc.

After that, run test and show the sequence of requests please.

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .