In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "what is the mechanism that Jmeter runs on HTTP requests in thread groups". In daily operations, I believe that many people have doubts about the mechanism of Jmeter running HTTP requests in thread groups. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "what is the mechanism of Jmeter running HTTP requests in thread groups?" Next, please follow the editor to study!
For Jmeter to do performance or stress testing, first set up a thread group, add transactions to the transaction thread group if needed, and then set the number of concurrent virtual users as needed. The technical route for Jmeter to construct concurrent virtual users is to construct threads, each of which runs the same thread group at the same time. In order to understand the inaccuracy of jmeter statistics, we first need to understand the mechanism by which Jmeter runs on HTTP requests in thread groups.
1. Testing ideas
Step 1: record a web page using Jmeter
Step 2: set up the test plan, run the script once, and pass the process (wireShark grab package)
Step 3: analyze the sequence of HTTP requests by analyzing the packet capture results of wireShark network.
In step 4:wireShark, the sequence of HTTP requests obtained by grabbing the package is compared with the screen when browsing to visit URL separately.
2. Select the object to be tested
Based on the above ideas, we select a web URL from the network as the tested object.
3. When recording the script, F12 opens the network option of Chorme.
Record the above URL through the proxy recording function included in Jmeter 5.1. press F12 during the recording process to switch to the network option.
Note: when recording Jmeter, you must press F12 to open the network of chrome to record the complete HTTP request, otherwise you may only be able to record the first request.
HTTP waterfall diagram of the page when the Jmeter script is recorded
4. Execute the performance test plan
Click the test plan launch button of Jmeter, and a single user starts to execute the script once.
Note: this figure obtains the start and end time of the HTTP request through the network capture packet of wireShark, and then draws the waterfall through excel.
5. Analysis of test results
From the waterfall diagram of the wireShark package analysis of the execution results of Jmeter's test plan, Jmeter sends the HTTP request serially (the previous request returns the end, and the next request begins to send the request), and the number of concurrent HTTP is 1. It takes more than 3 seconds from the beginning to the end of the execution, and the time for the real browser to access the URL alone is about 1 second.
Jmeter can be used to debug the functions of developers in product development and do some non-quantitative performance tests, but it is not suitable for testers to do quantitative performance tests, let alone mislead others by outputting test results.
If the service provided by the web server is a HTTP interface function (not a web page), and the user's access is linear (serial access), you can consider using Jmeter testing. Even if the services provided by the web server are HTTP interface functions (non-web pages), the test results are unreliable if the user access is non-linear. Keep in mind that only the linear interface request model applies to Jmeter.
At this point, the study on "what is the mechanism by which Jmeter runs HTTP requests in thread groups" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.