In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Load testing is a way to ensure that your Web site or application does not crash under heavy load. One of the basic things you need to do when doing load testing is to expand the number of virtual users you are testing. Depending on your business needs, you may need to expand to a large number, perhaps even 1000000 users.
Here are five ways to help you with performance testing extensions:
1. Plan in advance
In many cases, a huge increase in the number of users can be expected. For example, it is expected to be at the food delivery site of the big game (Sunday, February 5) or the day of the live TV website, Black Friday in retail stores, the day of choice for the purchase of pop music tickets, rush-hour festivals or movies, the first week of launching a new app or website, and so on.
Therefore, we recommend that you start load testing for large users at least a few months in advance. Worried that it is too late for you to leave your load test? We can help. Make sure you have enough time to run the test, find your breakpoint, resolve any bottlenecks that need to be fixed, and then run the test again to make sure everything is all right. The number of users you should test depends on your business needs and your expectations.
In any case, we recommend that you integrate load testing into the continuous integration process.
2. Record your test scenario
Documenting your user scenarios is the easiest and most useful way to create tests. Although JMeter provides recording options, the most useful and easy-to-use recorder is the BlazeMeter Chrome extension, which is free.
Record the load test scenario:
-add recorder to Chrome from the Chrome Store
-Type the test name
-Click the "record" button and browse the scenario you want to test.
-Click the stop button.
-if necessary, edit-Export to .jmx and upload to JMeter, or click play to open it in CA BlazeMeter.
It is recommended that test scenarios be recorded for any load test. However, it takes some time to scale to a high number of people, so you need to simplify as many processes as possible. That's what recorder does.
3. Remove all unnecessary data from your test script
Load testing takes up a lot of resources, but after large-scale expansion, it will take up more resources. To ensure that your resources do not crash because of bottlenecks that have nothing to do with content. To do this, delete any unnecessary data.
For example, let's assume that you won't run large-scale tests on JMeter (possibly hundreds-1K users on a single machine), so remove listeners (but be sure to keep them when running tests on JMeter).
4. Adjust the test gradually
Testing with a large number of users for the first time may be successful, or it may cause the system to crash. The reason may be that its own test environment is not well built, or because of a large number of users.
In the above case, you want to find out when and why the system crashed. We recommend that you conduct testing step by step and adjust the number of virtual users appropriately.
-start the local test by first setting up 1 thread (virtual user) on JMeter to ensure that the test works properly.
-manually change the number of users in the thread group to tens or hundreds. If it is working properly, continue to add users.
-after a certain number of users are reached, the local computer may not be able to handle the load. If you still need to add users, you can continue to expand using tools such as CA BlazeMeter, a JMeter in the cloud.
-run the test in SandBox mode to ensure that it works properly.
-gradually expand to the number of users you need. Once you have reached the maximum number available for a single Control Station, go to the multiple test option for CA BlazeMeter and copy the test until you reach the required number of users. Read more here.
By gradually adding users, you can identify your breakpoints and identify bottlenecks, such as high memory usage or incorrect DB usage. Fix the bottleneck and continue testing until you reach a breakpoint that is higher than the number of users you decide to handle.
5. Constantly analyze test results and engine health
When doing load testing, CUP and memory usage are the two most important metrics we see. You need to determine the level of usage that the system cannot cross, but if the CPU reaches 75% and 85% of memory, you reach the red line that you cannot cross.
To monitor the health of the system, review the reports provided by the load test system and analyze the different KPI and their dependencies. CA BlazeMeter provides Engine Health reports, but you can also analyze these parameters on Taurus, an open source test automation tool.
After each test run, it is important to analyze the results in real time. These ensure that you have a comprehensive understanding of your system's capabilities, weaknesses, and bottlenecks. They also let you see what happens when you change the system, such as adding functionality or changing the architecture of the system. Finally, they let you see if the changes you made are really helpful.
It is very important to ensure that the system can withstand heavy loads to maintain the number of users. We hope these methods will help you expand your high number of users.
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.