0

How to Run Requests inside the thread consecutively and not at the same time using Jmeter(one by one). I want to achieve the following one at a time.

Thread 1 - Create Product Create Product Create Product Create Product Create Product Create Product Create Product Create Product Create Product Create Product Create Product Thread 2 - Get Product by Id Get Product By Id Get Product By Id Get Product By Id Get Product By Id Get Product By Id Get Product By Id Get Product By Id Get Product By Id Get Product By Id Get Product By Id Thread 3 - Get All Products Get Products Get Products Get Products Get Products Get Products Get Products Get Products Get Products Get Products Get Products 

I have realized i am using a very bad method how can i achieve this? This is what i have done:

enter image description here

2 Answers 2

1

The suggestion is configure a TG using ONE thread, and use a loop (within the TG) to consecutively execute the requests whatever requests you need.

Sign up to request clarification or add additional context in comments.

2 Comments

TG? Thread group? yes but if i use the loop then it will run one request with 10 users. it is not that same
As mentioned, the Thread Group (TG) will be configured for only ONE VUser or thread, which will execute the 10 requests sequentially within the loop.
0

By default each JMeter thread (virtual user) runs Samplers consecutively (upside down) so you don't really need to do anything in order to achieve the desired behaviour.

If you want 2nd thread group to run after first thread group, 3rd thread group after 2nd, etc. just tick Run Thread Groups consecutively box on Test Plan level:

enter image description here

Also you might want to consider parameterizing your test plan using i.e. CSV Data Set Config so you won't have to copy and paste the requests but rather provide different values from an external source for each virtual user/iteration

3 Comments

i see sorry for the misunderstanding. Can i also achieve the same behaviour with the loop count on the thread level? without having to use CSV data set config or without having to copy and paste requests?
Each thread will execute samplers consecutively no matter how many loops you have, one or infinite number
yes thank you i got it but can i use a loop count instead of using CSV data set config to duplicated the requests? so lets say i need to run 10 samplers in each thread, cant i just make the loop count to 10?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.