jmeter-step pressure measurement

In performance testing, it is sometimes necessary to simulate a situation that often occurs in actual production, that is, to increase the pressure from a certain value until it reaches a certain value, or use fast or slow growth mode to increase concurrency and then continue to run for a period . Generally, the continuous running time is 10-20 minutes.

 

In jmeter, there is such a plug-in that can help us achieve this function. This plug-in is: Stepping Thread Group . This plugin is similar to the Controller in LoadRunner.

 

1. Download configuration method

Stepping Thread Group is a kind of jmeter plug-in, its role is to simulate the actual production situation, continue to exert pressure on the server until it reaches a certain value, and then continue to run for a period of time.

Download address: https://jmeter-plugins.org/downloads/old/

The download interface is as follows:

After downloading, you need to unzip it, and then put the JMeterPlugins-Standard.jar package in the jmeter-3.0 \ lib \ ext path of the jmeter installation directory , and restart jemter.

2. Introduction

Start jmeter, add thread group- jp @ gc-Stepping Thread Group

The functions are as follows:

This group will start 100 threads : Set the total number of threads started by the thread group to 100;

First, wait for N seconds : Before starting the first thread, you need to wait for N seconds;

Then start N threads : Set to start N threads at the beginning ;

Next, add 10 threads every 30 seconds, using ramp-up 5 seconds : every 30 seconds, start 10 threads within 5 seconds ;

Then hold load for 60 seconds : After the total number of started threads reaches the maximum value, continue to run for 60 seconds;

Finally, stop 5 threads every 1 seconds : stop 5 threads per second ;

Under the jpgc thread group of the adjusted jmeter script, configure the thread group data and run the script.

3. Generate HTML test report

Through the following commands, complete the test execution and generate HTML visual reports at one time

example:

jmeter -n -t E: \ script \ xingneng \ shop_demo.jmx -l E: \ script \ xingneng \ test.jtl -e -o E: \ script \ xingneng \ report

After the execution is completed, a test report will be generated in the specified directory:

Open the index file in the generated file directory with a browser, and the effect is shown as follows:

 

 After the test report is generated, the pressure test is completed. The next step is to analyze and process the data from the pressure test to obtain the results of the pressure test.

 

Guess you like

Origin www.cnblogs.com/dingxinwen/p/12751014.html