JMeter pressure testing tool installation and use tutorial

Time:2021-4-7

1、 JMeter Download

Enter the official website:http://jmeter.apache.org/

1. The first step is to enter the official website, as shown in the figure below

JMeter pressure testing tool installation and use tutorial

2. Choose to download, download it as a compressed package and unzip it.

JMeter pressure testing tool installation and use tutorial

JMeter pressure testing tool installation and use tutorial

3. I downloaded jmeter4.0, corresponding to JDK1.8. Then decompress it.

I think we should pay attention to three points

1) After decompression, the compressed package is called apache-jmeter-4.0.zip src.zip The suffixes are all wrong. After opening it, an error will be reported and it is not available, because the environment variable. Jar file that we will configure next is missing.

2) The corresponding JDK version should not be too low. Generally, JMeter 3.0 corresponds to jdk1.7, and JMeter 4.0 corresponds to JDK1.8 or above. Otherwise, error will be reported if JMeter is enabled.

3) Make sure that the environment variables are configured correctly (including JDK and JMeter).

OK, let’s configure the environment variables. Because I’m a novice, I refer to the tutorial of the big guys. I’ll summarize and make a note according to my actual situation.

2、 JMeter environment variable configuration

1.) computer desktop — “computer” icon — “right click to select” properties “–” click Advanced system settings — “advanced” — “environment variables page

 JMeter pressure testing tool installation and use tutorial

2) Start configuring environment variables. In the system variable box, click “new” to create a variable: JMeter_ Home, the value is the JMeter installation path that you unzipped. My installation path is on disk e, which is filled in according to my actual installation path. Then click OK to save

JMeter pressure testing tool installation and use tutorial

JMeter pressure testing tool installation and use tutorial

3) Configure the classpath variable. If not, create a new one according to the above steps. If not, select it directly and click Edit. The variable value is fixed to% JMeter_ HOME%libextApacheJMeter_ core.jar ;%JMETER_ HOME% libjorphan.jar ;%JMETER_ Home% lib / logkit-2.0.jar; you must save it after you finish it. If you are not sure, you can click OK until you go back to my computer page

JMeter pressure testing tool installation and use tutorial

4) The basic configuration is completed, and then verify whether the configuration is correct and available.

First, go to your JMeter installation path, find the bin folder, click in and find the jmeter.bat , right mouse button to run in administrator mode, or double-click to open directly, two interfaces will pop up: 1. Command window. When using JMeter, this command window can’t be closed, you can narrow to the computer taskbar. 2. Another interface is JMeter work page, in which you can perform related operations. The details are shown in the figure

JMeter pressure testing tool installation and use tutorial

5) To confirm the success of the installation, double-click jmeter.bat Or run as an administrator. The page is as follows:

JMeter pressure testing tool installation and use tutorial

6) The working area of JMeter is as follows: every time we use JMeter, the first way to open it is to enter the bin file and double-click this jmeter.bat If you feel troublesome, you can right-click the mouse shortcut to send the computer desktop, it will be much more convenient.

JMeter pressure testing tool installation and use tutorial

7. End of installation~

3、 JMeter test case operation

1. Add this test plan (right click to add threads (users) – > thread group)

JMeter pressure testing tool installation and use tutorial

2. Set the number of threads (the number of threads is the number of concurrent users)

JMeter pressure testing tool installation and use tutorial

3. Add protocol and related configuration information

JMeter pressure testing tool installation and use tutorial

4. Adding listeners to threads

JMeter pressure testing tool installation and use tutorial

5. Start the test

JMeter pressure testing tool installation and use tutorial

6. View report

View result tree

JMeter pressure testing tool installation and use tutorial

Aggregation Report

JMeter pressure testing tool installation and use tutorial

Graphical results

JMeter pressure testing tool installation and use tutorial

So far, the test tutorial is basically completed!