1

How 100 user hit a site at a time?

I created a test plan for an eCommerce site to process checkout

Here:

Thread group = 1

ramp up = 0

Loop count= 100

But what I get is, 2nd thread is started after completing the 1 st one.

I want all the thread to start at a time.

Can anyone ans for this?

1

Use the field "Number of Threads" to set as many threads as required for your load test (eg. 100).

The ramp-up period which is the number of seconds that JMeter will take to create all 'n' threads gradually instead of starting the system with 'n' threads in one go. In your case, that is set to 0. Try increasing it.

The field "Loop Count" is used to set the number of times each thread should run for eg. 100. You can select the checkbox 'Forever' if you want to threads to run as the checkbox suggests.

  • If OP's ramp up time is zero then why threads are running one by one? – Helping Hands Nov 26 '15 at 10:07
  • Number of Threads is the important field in this case. Ramp of 0 in theory behaves like a Ramp of 1. I have had (unexplained) issues with using 0 in the past though. – ECiurleo Nov 26 '15 at 10:12
  • I see. then if ramp up 0 even though all threads will run one by one , right? – Helping Hands Nov 26 '15 at 10:15
  • 1
    Thanks ECiurleo I am New to Jmeter and your ans really helped me – CSachdev Nov 28 '15 at 11:38
1

JMeter acts as follows:

  • It starts threads (which stand for virtual users) during ramp-up period
  • Threads start executing samplers upside down (or according to Logic Controllers)
  • When thread doesn't have samplers to execute and loops to iterate it's being shut down

See Adding Users section of JMeter User Manual for more detailed explanation

So

  1. If you want 100 concurrent users - make sure you provide not only 100 threads, but enough loops so threads could remain up and running for the anticipated test time otherwise you can run into situation when some threads have already finished their work and some of them haven't been started yet.
  2. If you're looking for the way to run single (or multiple) request(s) by 100 threads at exactly the same time - use Synchronizing Timer
  3. 100 concurrent users don't mean 100 requests per second, actual throughput will depend on response time. If you need to simulate load 100 requests per second - use Constant Throughput Timer or Throughput Shaping Timer (the last one is available via JMeter Plugins project)
0

All you have to do is change the scenario you are using from,

Thread group = 1

ramp up = 0

Loop count= 100

to,

Thread group = 100

ramp up = 1 <or you can also leave it 0>

Loop count= 1

In the first scenario you are simply making 1 user request 100 times and hence each request only executes after the previous request completes. Think of it as,

for (i=0; i<100; i++) {
 hit URL;
}

Whereas, in the second scenario you are telling JMeter to make hundred requests at the same time.

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.