4

I have defined a few samplers in JMeter.

I want to trigger all those samplers at same time. Example: Say, I have 5 users and 5 samplers. I want each sampler is triggered at same time by each of user. This is the scenario.

How can I simulate this scenario using Jmeter?

1
  • I have scenario where I have to run multiple JDBC request using csv files for each JDBC request.How can I do this.Please help me. Thanks in advance.
    – user26025
    Jun 6, 2017 at 10:03

5 Answers 5

8

You would need 2 Thread Groups (TG).

Make sure that "Run Thread Groups consecutively" under your test plan is UNCHECKED else you'll be having 2nd TG running after 1st TG.

7

Your scenario is,

5 Users hitting 5 URLs(samplers) simultaneously.

So what you need to do is, in your Test Plan, add 5 Thread Groups. In each Thread Group configure the number of Threads to 5 and Ramp Up to 0.

Now, add one HTTP Request sampler in each Thread Group. Configure each sampler according to the URL you want to test.

Add Listener(s) to your Test Plan. Save the Test Plan and Run your test.

Make sure you haven't selected the "Run Thread Groups consecutively" in the Test Plan.

2
  • This scheme does not seem to scale well, what if I need to have 500 Simultaneous users, in that case, do I need to configure 500 Thread Groups?
    – kamal
    Dec 2, 2021 at 7:29
  • Individual thread groups aren't for each individual user. In Jmeter to generate a load of 500 users you need set up Threads within the Thread Group as 500. Threads represents users in Jmeter. Dec 2, 2021 at 9:21
2

If you want to execute the same sampler simultaneously for a few users you have to put sampler into Synchronizing Timer

1
  • 1
    No, I want to execute different samplers simultaneously. Nov 26, 2014 at 3:40
1

You should add multiple "Thread Group" into a "Test Plan". Inside "Test Plan" unselect "Run thread groups consecutively".

Inside every "Thread Group" configure "Number of Threads(users)" as "5", "Ramp-Up Period" as "0", "Loop Count" as "1".

For 5 Samplers you should need 5 "Thread Group". Now, add 1 "HTTP Request" into each "Thread Group".

Configure Every "HTTP Request".

Now add "View Results Tree" as a listener into a "Test Plan". Now run the Test plan.

example of sending multiple requests at the same time to do a concurrent testing

0

You can use Parallel Controller plugin in JMeter, created by Blazemeter for JMeter.
Please refer this link for more info.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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