In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "what are the skills for the use of JMeter". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the skills for using JMeter".
How to use JMeter with English interface
When Jmeter starts, it will automatically judge the locale of the operating system and choose the appropriate language to start, so after we start jmeter, it will appear a friendly Chinese interface. However, due to the poor Sinicization of jmeter itself, you will see that there are options and component parameters that have not been Sinicized. And some of the translation is not accurate, so for those who are good at English, they prefer the pure English interface.
The methods to force jmeter to be started in English are as follows:
Under the windows environment, open the jmeter decompression directory, the jmeter.bat file under the bin directory, that is, the startup file of the jmeter program, and choose notepad to open it. Make the following changes:
.
Set HEAP=-Xms512m-Xmx512m
Set NEW=-XX:NewSize=128m-XX:MaxNewSize=128m
Set SURVIVOR=-XX:SurvivorRatio=8-XX:TargetSurvivorRatio=50%
Set TENURING=-XX:MaxTenuringThreshold=2
Set RMIGC=-Dsun.rmi.dgc.client.gcInterval=600000-Dsun.rmi.dgc.server.gcInterval=600000
Set PERM=-XX:PermSize=64m-XX:MaxPermSize=64m
Set LOCALE=-Duser.language=en-Duser.region=rem
Set DEBUG=-verbose:gc-XX:+PrintTenuringDistribution
.
Rem Server mode
Rem Collect the settings defined above
Set ARGS=%DUMP% HEAP% NEW% SURVIVOR% TENURING% RMIGC% PERM% DDRAW% LOCALE%
.
Dizzy, when I introduced so much above, in the latest version 2.8, I stumbled upon this feature.
How to use a mirror server
In the process of debugging and modifying the test plan, some additional settings are usually added to the sampler, such as the additional HTTP header, cookie manager, or authentication manager, etc., but when these are set, is the request issued by sampler exactly as expected?
Of course, users can check the HTTP requests issued by the sampler by adding listeners, but how to solve this problem if they don't really want to send the request to the application under test during debugging?
Jmeter provides a component called HTTP Mirror Server, and HTTP Mirror Server can start a mirrored server that returns all received requests intact so that you can see the exact content of the request.
How to add HTTP Mirror Server:
Right-click Workbench-> non-test components-> HTTP Mirror Server
If you need to change the port number, click the "start" button to start Server.
Next, modify the sampler to send the HTTP request to localhost:8081 (that is, where Mirror Server starts)
JMeter distributed testing
Jmeter is a java application, which consumes a lot of CPU and memory. Therefore, when thousands of concurrent users need to be simulated, it is somewhat inadequate to use a single machine to simulate all concurrent users, and even cause JAVA memory overflow errors. In order for jmeter tools to provide greater load capacity, jmeter has a mechanism for using multiple machines to generate load at the same time.
So, how can multiple loaders run at the same time? Of course, there will not be more than one person sitting in front of multiple loaders, as soon as the cry starts, everyone starts jmeter at the same time. This approach is stupid and difficult to achieve real synchronization. In fact, we can control multiple remote jmeter servers through a single jmeter client and make them stress test the server synchronously.
Start Debug logging
Most test components support Debug logging. If you run the test plan through GUI, you can use the help menu enable debug or disable debug after the test component is selected. There is an option "What's this node?" in the help menu.
It allows you to view the class names of GUI and test components, as shown in figure 11-7. With them, testers can decide which JMeter property to modify in order to modify the log level.
For example, we can click on a HTTP request and select "help" in the menu bar-- > what's this node?
Passing variables between threads
The scope of the JMeter variable is limited to the thread it belongs to. This design is well thought out so that the test thread can run independently. Sometimes users may need to pass variables between different threads (which may or may not belong to the same thread group).
One way to do this is to use properties. Property is shared by all JMeter threads, so when one thread sets a property, other threads can read the updated value.
If there is a large amount of data that needs to be passed between threads, consider using files. For example, a tester can use a listener in a thread to save the response to a file (Save Responses to a file) or BeanShell PostProcessor. In another thread, the "file:" protocol of the HTTP sampler is used to read the file, and then a post processor or BeanShell test element is used to extract the information.
If the tester can get the test data before the test starts, it is best to save the data to a file and read it using CSV Dataset.
Thank you for your reading, these are the contents of "what are the skills for the use of JMeter?" after the study of this article, I believe you have a deeper understanding of what skills you have in the use of JMeter, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.