Interview Nirvana: Jmeter Performance Testing Guide (Third Edition) (Script Development)

Today is the last chapter, mainly about jmeter performance test scripts. It’s not easy to be original, please give me a thumbs up!

1. Outline of script development methods

1. Badboy records and exports

badboy download address:

Link: https://pan.baidu.com/s/18Po3RssrBRSnn_-xsHop1g

    Extraction code: h4w4

You can use it by directly decompressing it. Enter the corresponding recorded URL on the interface to operate. After the recording is completed, export it as: export to jmeter. After opening it in jmeter, you can optimize the script.

2. jmeter proxy server

a. Set up the startup service proxy and set up the proxy service on the network. If it is a third-party server, write the IP of the third-party server instead of the local IP (127.0.0.1)

b. Open jmeter and create a new thread group. The purpose is to have a place to store the recorded script. The target controller selects the corresponding main thread group to store the script and add non-test components: http proxy server. After clicking Start, you can record. Recording Stop after completion, and the requested recording script will appear in the thread group.

c. You can use regular expressions to filter by excluding patterns in http service proxy requests.

d. Proxy request recording again, and found that the .png format has been filtered out.

3. Export the jmx format after capturing the packet with fiddler, open it in jmeter and optimize it. After capturing the packet, select the corresponding url to make notes (select the url and press the M key to make notes)

Export jmx after downloading the fiddler plug-in

Plug-in download link:

Link: https://pan.baidu.com/s/18uffy67lIfNatMGkjnC_2g

      Extraction code: iy20

Open the exported file in jmeter, you can see the corresponding note URL, and optimize the recording script.

Tools are an aid in testing but not a necessity!

Tools are an aid in testing but not a necessity!

Tools are an aid in testing but not a necessity!

Summarize:

Through the performance testing ideas and tools introduced above, we can basically complete a performance test and perform performance positioning of some problems. However, performance problems are often hidden deeply and are affected by various conditions, such as various links. Configuration parameters, network conditions, machine conditions, performance testing tools, etc. Therefore, the results of performance testing often cannot be compared separately from a certain environment. Different configurations, environments, and application performance will show different results and problems may arise. At the same time, we also need to carefully analyze the execution of each process from front to back, top to bottom, and gradually use tools to assist in positioning, so that we can finally find the bottleneck. In short, performance testing is a job that tests patience, carefulness, breadth and depth of knowledge. Every time you encounter a problem, ask a few questions why, do more analysis and verification, and try to solve and optimize it. This will definitely make you more confident. The system has more different understandings.

The JMeter performance test article has been completed. It is not easy to be original. Please give it a thumbs up!

Refill

Guess you like

Origin blog.csdn.net/a448335587/article/details/133322057