preface

Recently, I need to use Jmeter to do load test, so I learned to do database concurrent test and Web test with Jmeter. Here is a record summary. Article for new people, master please ignore.


What is the Jmeter

JMeter, also known as “Apache JMeter,” is an open source, 100% Java-based application with a (albeit ugly) graphical interface. It is designed to analyze and measure the performance and load functional behavior of Web applications and various services. JMeter is primarily used for testing Web applications or FTP applications, but currently, it is suitable for functional testing, JDBC database connections, Web services, universal TCP connections, and OS native processes.

Supported Protocols

List of protocols supported by JMeter:

  • Web Services – SOAP / XML-RPC
  • Web 2.0 (Ajax, Flex and Flex-WS-AMF)
  • Database through the JDBC driver
  • – the LDAP directory
  • Messaging oriented services over JMS
  • Services – POP3, IMAP, SMTP


Jmeter downloads the configuration

Jmeter download address, click in



Select a download (Windows)



Find the download directory, go to bin\ and click jmeter.bat

Jmeter takes a while to launch, and then you get an ugly interface. Just tweak it 😃



CMD window do not close, otherwise it will exit the program, the next step into the practical test link! ง ง, _, ()


MySql Database test

Step 1 Add the mysql driver package

Add the mysql-connect-java package to the lib\ directory. Here I’m using 8.0.13

Driver: com.mysql.jdbc.Driver: com.mysql.jdbc.Driver: com.mysql.jdbc.Driver: com.mysql.jdbc



If you add a lower version, it won’t. It’s just a small problem = ̄ω ̄=


Step 2 Create and configure Thread groups

Right-click Test Plan as follows…



Fill in the Number of Threads according to your own needs, and ignore the ramp-up Period




Step 3 Configure the JDBC connection

The Thread pool name must be filled in, otherwise an error will be reported



Fill in the information for the database to be tested below



Step 4 Configure the Samper Samper

The Samper is a request source



Fill in the pool name you filled in before, and then the SQL statement you want to test



Step 5 Create a Listener

At this point, you create a listener that displays the test information



Step 6 Enable the test

Switch to the View Result Tree and enable the test



You can see the output test results YEAH! (•̀ ω •́)y


Web testing

With the basics in place, Web testing is easy

Step 1 Create and configure Thread groups




Step 2 Configure the Samper Samper



The configuration here is a microservice I did before Spring Boot, of course, you can fill in other sites to try the effect




Step 3 Create a Listener




Step 4 Enable the test



YEAH! (•̀ ω •́)y



Finally, I hope you found this article helpful (* ^ – ^ *).