Let’s walk through a step load testing setup designed to evaluate system performance under gradually increasing user loads. The test follows a three-stage structure, where the number of users steadily rises in steps, holds for a set period, and then ramps down. This approach helps assess system scalability, identify performance bottlenecks, and determine how well the system handles increasing traffic over time.
Why Step load Testing?
Step load or stress test, designed to measure how the system performs under progressively increasing loads rather than an abrupt spike.
Download the JMeter Ultimate Thread Group plugin
Setting up this test will required you to use the so called Ultimate Thread Group feature for JMeter. If you haven’t already, make sure to download it by following the next steps!
Source to download JMeter Ultimate Thread Group plugin:
https://jmeter-plugins.org/?search=jpgc-casutg
The downloaded materials structure will look something like this:
lib/
├── javaFile
└── ext/
├── javaPlugin
└── javaPlugin
You have to add these files in the matching folders in your JMeter folder setup.
Steps for Setup in JMeter
- Add Ultimate Thread Group Plugin
- Start by adding the Ultimate Thread Group from the available JMeter plugins.
- Scenario Creation
- Define the step load scenario based on user load requirements.
- For this example, we test a system with 200 users, starting with 150 and gradually increasing by 25 users in stages.
Configuration Parameters
Initial Stage (150 Users)
- Initial Delay: 0 seconds
- The test begins immediately.
- Ramp-Up: 1350 seconds
- 150 users ramp up gradually over 1350 seconds (9 seconds per user).
- Hold Time: 2400 seconds
- Users stay active for 40 minutes.
- Ramp-Down: 600 seconds
- Gradual reduction of users over 10 minutes.
Intermediate Stage (175 Users)
- Initial Delay: 1950 seconds
- This stage starts 32 minutes and 30 seconds into the test.
- Ramp-Up: 225 seconds
- 25 additional users ramp up in 225 seconds.
- Hold Time: 1575 seconds
- Users remain active for 26 minutes and 15 seconds.
- Ramp-Down: 600 seconds
- Gradual reduction of users over 10 minutes.
Final Stage (200 Users)
- Initial Delay: 2775 seconds
- This stage starts 46 minutes and 15 seconds into the test.
- Ramp-Up: 225 seconds
- 25 more users ramp up in 225 seconds.
- Hold Time: 750 seconds
- Users stay active for 12 minutes and 30 seconds.
- Ramp-Down: 600 seconds
- Gradual reduction of users over 10 minutes.
Final Pattern Overview
Stage | User Count (Start Threads Count) | Initial delay (seconds) | Ramp-Up (Seconds) | Hold Time (Seconds) | Ramp-Down (Seconds) |
---|---|---|---|---|---|
Initial | 150 | 0 | 1350 | 2400 | 600 |
Intermediate | 175 | 1950 | 225 | 1575 | 600 |
Final | 200 | 2775 | 225 | 750 | 600 |
This configuration ensures a realistic simulation of gradual user load, followed by stabilization and graceful ramp-down. By incrementally increasing users and defining hold periods logically, the test mimics real-world user behavior during increasing traffic scenarios.
For how long should this test last?
To calculate the total duration of the test, we need to sum the initial delay, ramp-up time, hold time, and ramp-down time for each stage.
Since each stage starts at different times but overlaps with the previous ones, the total test duration will be determined by when the Final Stage ends.
- The Final Stage starts at 2775 seconds and lasts 4350 seconds.
- End time of test = 2775 + 4350 = 7125 seconds.
The test should last 7,125 seconds (or 1 hour, 58 minutes, and 45 seconds).
Running the test
We don’t wanna run the test through the GUI since it will slow our test down and it can screw the results. What we want to do is to use the command line. So follow this example:
First, open the PowerShell
Then, use the Set-Location commant with the path of the saved test file. In order to copy the whole file path, we can open the properties of the file and copy the location value.
Set-Location "C:\Users\38163\Downloads\apache-jmeter-5.6.3\apache-jmeter-5.6.3\bin"
When we submit this, we are ready to proceed. Now, we can run a command such as the following that will run our test in terminal, and in addition to that it will create statistical report inside of our bin folder that we will be able to analyse the results.
./jmeter -n -t .\tests\step-load-test.jmx -l .\logs\step-load-test.jtl -e -o .\step-load-test-report\