Script preparation

Step1: install jmeter

Download address

Step2: create a test plan

Write assertions

Generating random variables

The meaning of the ramp-up period field

Step3: create a backend listener (this step is used to display pressure test results directly on grafana)

See grafana configuration for details

Step3.1: Back-end listener implementation

For backend listener implementation, select influxDB

After executing the test script on the server, you can view the test report on Grafana

Compared with step3 in the following steps, the interface is more intuitive and beautiful, and the operation is more convenient. You can view the report without exporting it.

Prepare the Linux server environment

Select a pressure test server

Step1: install jmeter in the specified Linux directory

Step2: import the test script to the jmeter directory

rz

Start the testreference

Step1: go to the jmeter/bin directory

Execute the script:

./jmeter -n -t orderandpay.jmx -l order_result2000.jtl

Modifying script Content

vim order.jmx

Step2: export the report to Windows

sz order_result2000.jtl

Step3: Check the report

Create a listener of the desired type in Windows, import the JTL file, and view the result

Field meaning of aggregation report: Refer to “Full Stack Performance Test Training Treasure -JMeter Practice”

Lable: Request alias

Samples: How many Samples were performed

Average: indicates the Average response time in milliseconds

Median: Median response time

90%Line: 90% transaction response time range

Min: indicates the minimum response time

Max: indicates the maximum response time

Error% : indicates the Error rate

Throughput: Throughput

KB/ SEC: data transfer amount (unit: KB)

Field meaning of summary report and summary report

Exporting AN HTML Reportreference

./jmeter -g order_result2000.jtl -o order_result2000_reports

Open the HTML file in Reports in your browser to see the summary test reports

Export the report to Windows