Get the App
SLTechnology News&Howtos  ›  Development  › 

How to implement performance testing with Jmeter

Shulou Source: shulou.com Published: 2022-06-02 07:33:34 11月11日 Update

This article introduces the knowledge of "how to achieve performance testing in Jmeter". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1.1 Overview

JMeter, every senior test engineer, must master the testing tools, proficient in the use of Jmeter can greatly improve work efficiency. After you are proficient in using Jmeter, you won't be able to use LoadRunner if you can do things with Jmeter. Jmeter is a free open source testing tool developed using Java, which is mainly used for functional testing and performance testing (stress testing / load testing). And use Jmeter to test Restful API, very easy to use.

1.2 protocols supported by JMeter

Web 2.0 of Web1.0 of web:HTTP,HTTPS site (ajax, flex and flex-ws-amf)

Web Services: SOAP / XML-RPC

Through the database of JDBC driver

Directory: LDAP

Message-oriented services through JMS

Service: POP3, IMAP, SMTP

FTP service

1.3The effect of Jmeter

It's free. Open source software.

It has a simple and intuitive graphical user interface.

There are many different server types for load and performance testing in JMeter: website-HTTP,HTTPS,SOAP, database via JDBC,LDAP,JMS, mail-POP3

It is a platform-independent tool. Click on the shell script in Linux / UNIX,JMeter in JMeter to call it. On Windows, it can call the startup jmeter.bat file.

It has full Swing and lightweight component support (precompiled JAR is used in the package javax.swing).

The JMeter test plan is stored in XML format. This means that a test plan can be generated using a text editor.

Its complete multithreading framework allows different functions of concurrent multithreading and synchronous sampling to be sampled by separate thread groups.

It is highly scalable.

It can also be used to perform automated and functional tests of applications.

1. Performance testing of Jmeter implementation

Step 1: configure the jdk environment

If you want to use Jmeter, your machine must be configured with the environment variable of jdk

Step 2: download jmeter

Step 3: start Jmeter

Under the non-special path, extract the downloaded file, go to the bin directory, and start the project.

Different operating systems have different boot commands.

After clicking jmeter.bat, the command box will pop up and a visual interface will be launched, and then you can add the test plan

Step 4: add a test plan

Right-click the test plan node and select a new element from the "add" list

Here you can set how many users to simulate, the number of cycles, and so on.

Step 5: set up the URL of the test

Step 6: start the test

Press the start button

Step 7: view the test results

Add a listener to select the result tree, and you can see the following:

This is the end of the content of "how to achieve performance testing in Jmeter". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Testing performance differences content functions tools threads services proficiency functional tests commands data databases files more test tools environment users interfaces directories Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB vpn Shulou Technology Apple Shulou Information