Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to download configuration and use Jmeter

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the knowledge of "how to download configuration and use of Jmeter". Many people will encounter such a dilemma in the operation of actual cases, 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!

Introduction to jemter

Jmeter is an open source stress testing tool developed by apache company based on java. It is small in size, full in function and easy to use. It is a relatively lightweight testing tool and is very simple to use. Because jmeter is developed by java, you must install jdk at run time. Jmeter is installation-free and can be unzipped directly after getting the installation package, and it can be used on linux/windows/macos.

   jmeter can do interface testing and stress testing. The simple operations of interface testing include doing http scripts (sending get/post requests, adding cookie, adding header, weighted limited authentication, uploading files), doing webservice scripts, parameterization, assertion, association (regular expression extractor and processing json-json path extractor) and jmeter operation of the database, and so on.

Advantages

1. Open source tools with good scalability

2. With high scalability, users can customize the debugging related module code.

3. Elaborate and simple GUI design, compact and flexible

4. Full portability and 100% pure java

5. Full swing and lightweight component support (precompiled HAR uses javax.swing.*) packages

6. A full multithreaded framework that allows simultaneous sampling of different functions through multiple threads and individual threads

7. Support script sampler

First, download

Log in to the official website Jmeter to download and get the compressed package jmeter-5.0.tgz, download address: http://jmeter.apache.org/download_jmeter.cgi

II. Installation

Just unpack the downloaded package. Here the path I unzipped to my computer is E:\ Mysoftware\ apache-jmeter-5.0.

III. Operation

Click jmeter.bat under the bin directory to start Jmeter.

After startup, you can see a graphical interface written by java.

4. A simple example of pressure test

There is a http request API http://localhost:8080/goods/to_list, which is to be stress tested using Jmeter. The test steps are as follows:

a. Create a new thread group.

b. Set thread group parameters. This is configured as follows: 10 threads, start at the same time, and loop once.

c. The default value of http request is added. On the thread group created in the previous step, the default value of http request is added. All requests will use the default value, which sets the protocol to http,IP to localhost and port to 8080.

d. Add a http request to stress test.

The protocol, IP and port in the first red box in the following figure do not need to be set. The default values set in step c will be used. You only need to set the request path Path. Enter / goods/to_list here.

e. Added a listener to view the stress test results. Three kinds are added here: aggregate reports, graphical results, and viewing the results in a table. The difference is that the results are presented in different ways.

f. Click the run button to start the stress test and view the results.

5. How to check the system load and performance bottleneck

Execute the following command on the server:

Top

As shown in the following figure, you can see the system load load average, the average load for 1 minute, the average load for 5 minutes, and the average load for 15 minutes are 1.58,0.50,0.23 respectively. At the same time, you can see that the most resource-consuming process is mysql.

This is the end of the content of "how to download configuration and use 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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report