2
votes

Hi I am new to JMeter and I do know how to perform load tests using JMeter. I tried to figure out how a stress test or a capacity test is performed via JMeter. Is it by gradually increasing threads in JMeter we can determine when performance hits are arise and get that threshold and run tests above the threshold. Does it make a stress test then?

Confused in how to perform a stress test and a capacity test with Jmeter tool.

2

2 Answers

2
votes

JMeter is very flexible and load scenario can be established in multiple ways. Out of box there are following test elements available:

  1. Thread Group - where you can set

    • Virtual Users Number
    • Ramp Up Time
    • Iterations count JMeter acts as follows: each samplers are being executed upside down with each thread representing virtual user. When thread has no more samplers to execute and no more iterations it is being shut down. For ramp-up bit: by default settings JMeter tries to kick off all the threads as fast as it can but you can configure it to simulate increasing load. I.e. if you have 30 users and 30 seconds ramp-up time JMeter will start with 1 user and add one per second.
  2. Constant Throughput Timer

Constant Throughput Timer can be used to set exact load in "Requests per minute".

  1. Synchronizing Timer

Synchronizing Timer pauses test threads until threshold specified is reached. Once there are enough threads in pool JMeter releases them all at the same moment providing "spike" simultaneous load.

You can also use i.e. Ultimate Thread Group available via JMeter Plugins which provides easy and quick way of defining load scenario like:

  • Start with N users
  • Start up for S seconds
  • Hold the load for L seconds
  • Shut down test threads in T seconds

Hope this helps.

0
votes

first of all both Load test & Stress test can help you determine the capacity of the system.

In order to perform load test, use the "Thread Group" available in Jmeter.

http://jmeter.apache.org/usermanual/test_plan.html

while doing a load test you will have to increase the user load gradually after 1 iteration has been executed completely e.g. you want to execute load test for 100, 200, 300, .... ,1000 so first iteration you have to keep "no. of threads" as 100, run the test save the results and then change the value in "no. of threads" to 200 & so on.

In order to perform stress test, use "jp@gc Stepping Thread Group"

http://testingfreak.com/tools/jmeter/stepping-thread-group/

hope this will help.