0

Recently I am 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.

Thank you in advance. I hope that my explanation can give you more clearer image.

0

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)

  • 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 at 6:05
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.