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

What are the functions of jmeter

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly explains "what are the functions of jmeter". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "what are the functions of jmeter"?

0 preface

When it comes to the difference between Jmeter and LoadRunner, many people may say that the chart analysis function of Jmeter is very poor, while LoadRunner is very powerful in this respect.

I felt the same way for a long time, and even complained that the results of jmeter analysis were too weak.

But with the in-depth understanding of Jmeter, my view has gradually changed. It is undeniable that the chart analysis function of LR is indeed very powerful, but at the same time it is accompanied by its bulky, slow response and other shortcomings.

And Jmeter actually provides a lot of components and third-party plug-ins for us to carry out various aspects of data analysis, we can choose which to use or not to use according to our own needs, because in actual work, we are more concerned about performance indicators are often only three or five, not all indicators to statistics, and according to different system concerns will also change. Then, when you are familiar with the various analytical components of Jmeter, it will provide a lot of convenience for work and improve work efficiency.

So what components and plug-ins does jmeter provide for us to use? The most common thing is to look at the result tree and aggregate reports, which I believe everyone has used, followed by other components in the listener.

1 View result tree 1

Today, let's take a look at the most commonly used components-look at the result tree.

It can be said that this is the most commonly used listener in jmeter, through which you can see the send and return information of the request, and the usage is very simple.

Right-click on the test plan or thread group or sampler to add a listener-look at the result tree and do not need to make any settings

Execute the test (of course, if your script has been written), and then you can see the details in the view result tree.

What information can we see from the picture above?

First, look at the list of results on the left.

1. We usually say that a successful request will show green on the left, and a failure will show red.

2. in fact, when we do not make an assertion, showing green does not necessarily mean success, it only means that the response code is 200 or 300 series, and red indicates that the response code is 400 or 500 series. So to make sure that the request returned is correct, you must add an assertion, and only if the assertion succeeds will it be shown green.

3. There is a check box at the bottom on the left, Scroll automotically? When checked, the scroll bar scrolls down automatically when there are many requests.

Second, look at the "sampler result" on the right

1. A lot of information is shown here, which means as follows:

Thread Name: thread group name

Sample Start: startup start time

Load time: loading time, which is commonly used in our testing, and is also the time consumed by the entire request, which is completed from sending to receiving.

Latency: the waiting time, which is not commonly used, indicates the time from the request is sent to the first time the response is received

Size in bytes: total size of data sent

Headers size in bytes: send header size

Body size in bytes: the size of the rest of the sent data

Sample Count: send request statistics

Error Count: interactive error statistics

Response code: error code

Response message: return information

Response headers: returned header information

HTTPSampleResult: additional request information

2. Raw and Parsed

By default, what we see is the data of the raw status, or you can click the tab below to switch to the Parsed status to get a more intuitive view.

3. Configuration of sampler result data items

Click the Configure on the right, and the configuration box will pop up, where you can select the data you want to display in "sampler results", "request" and "response data" according to your needs. All of them are selected by default, and we are free to configure them.

Third, look at the "request" tab below

1. The request's url, parameters, request header, cookies and other details will be displayed in the request.

2. Select the display format of the request

Through the drop-down box on the left, you can select the format of the request display. The default is text, and the commonly used ones are json, xml, etc.

3. Raw and HTTP

Similarly, you can switch from the default raw format to HTTP format for easy viewing.

Here, you can search the content through the Search line below, enter the content directly in the text box, click Find to search in the current request, and you can also set Case sensitive case sensitivity and Regular regular expressions.

Fourth, the response data tab

1. Here is the response result data of the server. The content here is very important. We must always pay attention to it when we adjust the script.

2. Like the "request", you can also set the data display of the response through the drop-down box on the left.

3. The content of the current request can be searched through the following Search line.

5. The upper part

What I just introduced is the second half. Let's take a look at the first half.

1. Search line

Have you noticed that there is also a line of Search options here? what's the difference between this and the following Search options just mentioned?

One acts on all requests and one on the current single request.

The Search here is looked up in all the request results, and the following Search can only be found in the current request.

2. File name

Here you can set the file name and write the results to the file and save it. You can also import the previously generated jtl result file to view.

3. Filter request display result

Select "Log errors only" on the right to view only the request results of the errors. Select "Successes" to view only the results of successful requests.

At this point, I believe you have a deeper understanding of "what are the functions of jmeter?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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