当前位置:网站首页>JMeter performance test steps practical tutorial
JMeter performance test steps practical tutorial
2022-07-06 07:25:00 【Automated test】
1. Jmeter What is it? ?


2. Jmeter install
2.1 JDK install
because Jmeter Is based on java Development , First you need to download and install JDK ( at present JMeter Only to Java 8, Not yet in favor of Java 9)
1. Official website download address :
http://www.oracle.com/technetwork/java/javase/downloads/index.html
2. choice Java SE 8u151/ 8u152, Click on JDK download

3. Install the downloaded JDK
4. Configure system environment variables
2.2 JMeter install
Official website download address :http://jmeter.apache.org/download_jmeter.cgi
Download the latest JMeter 5.5 edition :apache-jmeter-5.5.zip

Unzip after download zip package
start-up JMeter
double-click JMeter Decompression path (apache-jmeter-5.5\bin)bin Below jmeter.bat that will do


3. Test case
We choose the most common Baidu search interface :
3.1 Address of the interface
http://www.baidu.com/s?ie=utf-8&wd=jmeter Performance testing
3.2 Request parameters
ie: Encoding mode , The default is utf-8
wd: Search terms
3.3 Return results
The search results , We can check whether there are search terms in the results wd To determine the success or failure of this request .

4. JMeter scripting
4.1 Add thread group
Right click on the “ test plan ” -> “ add to ” -> “Threads(Users)” -> “ Thread group ”

Here you can configure the thread group name , Number of threads , Long preparation time (Ramp-Up Period(in seconds)) cycles , Parameters such as scheduler :


Because interface debugging needs , We all use the default settings for now , We will come back to the configuration when we actually perform the performance test later .
4.2 add to HTTP request
Right click on the “ Thread group ” -> “ add to ” -> “Sampler” -> “HTTP request ”

For our interface http://www.baidu.com/s?ie=utf-8&wd=jmeter Performance testing , Please refer to the figure below to fill in :
Http Request details of main parameters :

4.3 Add view result tree
Right click on the “ Thread group ” -> “ add to ” -> “ Monitor ” -> “ Look at the fruit tree ”

At this time , We run Http request , Modify the response data format to “HTML Source Formatted”, You can see the title of the search results page is ”jmeter Performance testing _ Baidu search “.
4.4 Add user-defined variables
We can add user-defined variables to Http Request parameterization , Right click on the “ Thread group ” -> “ add to ” -> “ The configuration element ” -> “ User defined variables ”:

Add a parameter wd, Store search terms :
And in Http This parameter is used in the request , The format is :${wd}
4.5 Add assertions
Right click on the “HTTP request ” -> “ add to ”-> “ Assertion ” -> “ Response assertion ”

We verify that the returned text contains the search term , Add parameter ${wd} Go to the mode you want to test :

4.6 Add assertion results
Right click on the “HTTP request ” -> “ add to ”-> “ Monitor ” -> “ assertion results ”

At this time , Let's run it again and see whether the assertion results in success or failure

4.7 Add aggregation report
Right click on the “ Thread group ” -> “ add to ” -> “ Monitor ” -> “ Aggregation report ”, Used to store performance test reports

such , We have completed a complete Http Interface JMeter Performance test scripting .

5. Perform performance tests
5.1 Configure thread groups
Click thread group , Configure the parameters related to this performance test : Number of threads , cycles , Duration, etc , Here we configure the number of concurrent users as 10, Duration is 60s

5.2 Perform the test
Click the small green arrow button to start the test , Before testing, you need to click the small broom button to clear the previous debugging results .


6. Analysis test report
After the performance test is completed , Open the aggregation report to see :


If this article helps you , Please make up a little like ! Only in this way can I have the motivation to continue to update !
Have you learned today's little knowledge
Welcome to interact with us in the message area ~
If you think it's helpful, give it a compliment
Finally, Xiaobian arranges some learning material notes and the above jmeter A full set of tutorials for testing performance tools
Want to edit learning materials, notes, documents and the above postman A full set of tutorials for using interface testing tools
【 Private letter my key words “999” Free access 】 High salary resume template ( Interview collection is free )
High salary resume template ( Interview collection is free )


High salary resume template ( Interview collection is free )
![]()
边栏推荐
- Uncaught typeerror: cannot red properties of undefined (reading 'beforeeach') solution
- First knowledge of OpenGL es learning (1)
- NiO programming introduction
- leetcode841. Keys and rooms (medium)
- Twelve rules for naming variables
- 杰理之AD 系列 MIDI 功能说明【篇】
- Jerry needs to modify the profile definition of GATT [chapter]
- Cookie Technology & session Technology & ServletContext object
- TypeScript接口与泛型的使用
- 1091: two or three things in childhood (multi instance test)
猜你喜欢

Set picture annotation in markdown
![Jerry's ad series MIDI function description [chapter]](/img/28/e0f9b41db597ff3288af431c677001.png)
Jerry's ad series MIDI function description [chapter]

杰理之开发板上电开机,就可以手机打开 NRF 的 APP【篇】

Go learning -- implementing generics based on reflection and empty interfaces

Seriously recommend several machine learning official account

JDBC learning notes

杰理之BLE【篇】

ORACLE列转行--某字段按指定分隔符转多行
![If Jerry's Bluetooth device wants to send data to the mobile phone, the mobile phone needs to open the notify channel first [article]](/img/d6/92ad1c6f84415de6ab0dfd16cd6073.png)
If Jerry's Bluetooth device wants to send data to the mobile phone, the mobile phone needs to open the notify channel first [article]

JDBC学习笔记
随机推荐
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Typescript interface properties
[MySQL learning notes 29] trigger
智能终端设备加密防护的意义和措施
OpenJudge NOI 2.1 1749:数字方格
学go之路(二)基本类型及变量、常量
leetcode1020. Number of enclaves (medium)
Uncaught typeerror: cannot red properties of undefined (reading 'beforeeach') solution
MVVM of WPF
word中如何删除某符号前面或后面所有的文字
SEO学习的最好方式:搜索引擎
烧录场景下的源代码防泄密方案分享
Raspberry pie serial port login and SSH login methods
Get/post/put/patch/delete meaning
CDN acceleration and cracking anti-theft chain function
OpenGL ES 学习初识(1)
OpenJudge NOI 2.1 1661:Bomb Game
TypeScript void 基础类型
Select all the lines with a symbol in word and change them to titles
[dictionary tree] [trie] p3879 [tjoi2010] reading comprehension