In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Abstract: with the popularization and rapid development of Internet and the rapid increase of enterprise business, the concentration of data has become a trend, the load of IT system is getting heavier and heavier, and the performance of the system seriously affects the service quality provided by enterprises. Thus, the performance testing and tuning of IT system has attracted the attention of enterprises, and the performance test engineer has become a "paradox" in the IT market, and performance testing has a high technical challenge. So it attracts a large number of test enthusiasts to learn this technology, and when it comes to performance testing, many people will think of the famous LoadRunner, an excellent performance testing tool, but here the problem arises.
The relationship between LoadRunner and performance testing: the misunderstanding of LoadRunner beginners: deifying LoadRunner. Many beginners of LoadRunner think that they can do performance testing by mastering the performance testing tool LoadRunner. I often see a lot of people on the Internet learning how to use this excellent performance testing tool. There is nothing wrong with learning how to use LoadRunner, but they deify LoadRunner. "naive" think that it can do anything, and think that if you learn how to use LoadRunner, you can do performance testing. Although it took a lot of time to learn how to record scripts using LoadRunner, how to correlate, how to parameterize, how to set collection points, and so on. But in the end, the performance test will not be done. Why? Do not know how to analyze the resulting performance report? Do not know how to use the analysis report to analyze the bottleneck of the system? Do not know how to perform performance tuning? It is impossible to do things like this just by using LoadRunner! To put it bluntly, LoadRunner is only a tool for us to do performance testing, it is not omnipotent, how to do it depends on human operation and analysis. People who can use LoadRunner do not necessarily do performance testing, and people who can do performance testing do not necessarily use LoadRunner.LoadRunner as a performance testing tool. We should be aware that testing tools are only part of performance testing, only a means used to achieve the purpose of performance testing.
The relationship between performance testing and system performance: high-performance, high-security systems are not tested, but architected, designed, and written. Of course, I do not deny the importance of performance testing here. It can even be said that a system that has not been tested will not be an excellent system. Software is developed by people, and people always make mistakes. In order to do a good job in performance testing, performance testing should be carried out at these stages of software system requirements, design and writing code, not just at the stage of system testing, performance testing should run through the whole software development cycle.
Advice for beginner LoadRunner friends: I often see some netizens post on the Internet and ask, how to analyze the results of the performance test? How to choose the right protocol when testing the system? May I ask you about the person who posted these posts? Can you talk about the HTTP protocol in detail? How does TCP establish and release connections? What is an agreement? What is the agreement for? What is the role of each layer in the OSI reference model? What is the cause of concurrent conflicts in the database? Instead of relying too much on the study of LoadRunner tools and ignoring the study of other basic computer knowledge, we should master a programming language, good network basic knowledge, computer principle and operating system knowledge, and database knowledge. These are the premise and foundation for us to learn how to use LoadRunner.
1. Why master a programming language
First, when using LoadRunner, we often encounter situations where scripts cannot be recorded, or complex scripts need to be recorded, so we have to develop scripts manually. Although its second LoadRunner is powerful and easy to use, it belongs to commercial software, expensive, and the code is not open source, we can not understand the specific implementation details of LoadRunner, and we may even doubt whether the performance data collected by LoadRunner is accurate. It has how to implement and so on, which we can't know through the help documentation of LoadRunner. Performance testing tools are not only LoadRunner, there are many excellent performance testing tools to choose from, such as JMeter,Curl-Loader and other very excellent open source tools, although not on LoadRunner in all-round, but in some ways more powerful than LoadRunner. For example, Curl-Loader does not support many protocols, but it can generate up to 100000 concurrent users for http, which is far less than that of LoadRunner. And the code of these tools is open, from which we can analyze the details of the specific implementation, and we can also write our own code to enhance the function of the software, which is also a way to become a performance tester. Loadrunner is like our Windows operating system, easy to use, powerful, code closed, the omnipotence is more powerful than Linux. Our open source performance testing tools are like Linux operating system code open source, not easy to use, but in many ways more powerful than our Windows. Perhaps at this time, someone will ask which language is the best and most promising for beginners to learn. In fact, every language can survive, has its own reason for survival, each language has its own advantages and disadvantages, and the programming language has communication, learn one well, and then learn another programming language, very quickly. For beginners, I intend to learn C language for many reasons, for example, many excellent open source performance testing tools are developed in C language. . Of course, no matter what programming language, database, or operating system we choose, let's not think about which is the best and which is the most promising. We should choose the most suitable, not the best, according to our own situation.
2. Why should you master the knowledge of computer principle and operating system
Do you often see these questions on the forum? What is the relationship between threads and processes in LoadRunner? When are they used, and how can you tell the difference between a thread or a process? How to solve the garbled code caused by LoadRunner recording? How to find memory leaks? For those who post these questions, I still want to ask you, do you know the concept of processes and threads? Do you know how many states there are in the process? Do you know how inter-process communication works? Do you understand the concepts of deadlocks, the difference between processes and threads? If you don't even understand the concept of memory, the role of memory, and the concept of memory leak, how do you find memory leak? If you don't know all this, you naturally don't know how to do performance testing and analysis. Some netizens often make some strange mistakes when recording scripts? It is also said that this is the reason for LoadRunner. In fact, to solve these problems in the final analysis, we must have a good knowledge of computer principles and operating systems. Knowing the difference between processes and threads, you naturally understand that using process resources is high, but the security is stronger than threads, thread resources utilization is less, using threads can run more Vuser on a load generator, but there may be security problems. LoadRunner recording generated garbled how to solve? Why do you have garbled codes? do you know what a character set is? What is coding? How are strings stored in our memory? What is the difference between ASCII coding, ANSI coding, and UNICODE coding? These are the foundations of the operating system. Once you have mastered these, you will naturally understand the causes of garbled codes in LoadRunner. Of course, there is still a lot to master about the basic knowledge of computer principle and operating system. Such as operating system architecture, important basic concepts of operating system, memory management, storage / file system, driver / hardware management. Knowledge of computer principle and operating system is essential to do a good job in performance testing.
3. Why should we have a good network foundation
I often see a lot of people posting in the 51testing forum. Like in LoadRuner, why is there an association? How to choose the protocol when LoadRunner tests the system? How to perform IP spoofing in LoadRunner? Wait。 A random search of these questions will find a large number of posts, but in the final analysis, these problems do not have much to do with LoadRunner. To solve these problems does not lie in whether you are proficient in using LoadRunner, but in whether our basic knowledge of the network is solid. For example, why is there an association in the first question, LoadRunner? I believe many friends know that HTTP protocol is a hypertext transfer protocol, but some novices are often unable to elaborate on the specific content of HTTP, such as how HTTP works, why does HTTP protocol use TCP-based protocols instead of UDP protocols, and which layer of the OSI reference model does HTTP work on? How data is transmitted on HTTP protocol and so on. Only when we understand all this, we will naturally understand why we use association. In the end, you will find that the root LoadRunner relationship is not very big. The HTTP protocol is essentially stateless; every request for a page is treated as a new request, and by default, information from one request is not available to the next. In traditional Web programming, this usually means that with each round trip, all information associated with the page and the controls on the page is lost. For example, if the user enters the information into the text box, the information will be lost during the round trip from the browser or client device to the server. In order to browse the web page, the page and the page are not related to each other to lose the information, so there are Cookie,Session, query string and other techniques to keep the state. What is Cookie? What is Session? How do Cookie and Session work? When we understand these, a lot of questions naturally understand, such as these are all basic knowledge and LoadRunner related? A cookie is a small amount of data that is stored in a text file in the client file system or in the memory of a client browser session. Cookie contains site-specific information (such as user names and passwords and some personalized settings on the site, etc.), which is sent by the server to the client along with the page output. If the browser uses cookie, then all the data is saved on the browser side. For example, after we log in, the server sets the cookie user name, then when you request the server again, the browser will send the user name to the server, and these variables have certain special marks. The server will interpret it as a cookie variable, so as long as the browser is not closed, the cookie variable is always valid, so it can keep it online for a long time. If the valid time is set, it will save the cookie on the client's hard disk. The next time you visit the website, the browser first checks for cookie, and if so, reads the cookie and sends it to the server. These are the working process of Cookie. I often see some friends on the forum posting asking about some Cookie messages recorded when using LoadRunner. What is it used for? can I delete it when it looks annoying? With the knowledge of these details, you can naturally understand whether the Cookie information can be deleted. If the web server uses session, then all the data is saved on the server. Each time the client requests the server, it will send the SessionId of the current session. According to the current SessionId, the server uniquely identifies the browser that contains the session data on the server to determine whether the user is logged in or has certain permissions. Different users send requests Web servers will randomly send a unique SessionID. And when we use LoadRunner to record, it will SessionID us to death, so it leads to errors. At this point, you have to use associations, so you can understand not only how LoadRunner uses associations, but also why they are used. How to choose the protocol for the LoadRunner test system? This problem is also more discussed on the Internet. To solve this problem, we also have to rely on our solid network foundation, rather than our proficiency in using LoadRunner. First of all, we have to understand how LoadRunner works when recording. LoadRunner recording is different from QTP. It doesn't care about your object recognition, what interface you use, or what language you write. LoadRunner has an Agent process to monitor the communication between the client and the server. Then use your own function to record. LoadRunner is concerned about communication packets, the packets between the client and the server. At this point, everyone is more clear, why can't it be recorded sometimes? Because the protocol is not recognized, the packets intercepted by LoadRunner cannot be parsed, so the recording is empty. So we have to be familiar with what the protocol is, the OSI reference model, the function of each layer in the OSI reference model, the function of each layer of the TCP stack, the TCP,UDP,ICMP and so on. When we understand the basics of these networks, we will naturally understand how to choose protocols. In addition, how to carry out IP spoofing in LoadRunner? To solve this problem, we also need to have a good basic knowledge of the network. In fact, when we understand the format of IP addresses, the classification of IP addresses, the concept of subnet mask, and know how to divide non-standard subnets, and master these principles, then it is very simple how to deceive IP in LoadRunner. Of course, the basic knowledge of network is not only the above, but also the basic knowledge of routers, switches, encryption technology and so on, which is far more important than learning how to use LoadRunner.
4. Why is it necessary to master database knowledge
I think the importance of the database is self-evident. A very big reason for performance testing is because of the trend in a large set of data. in a sense, testing is a test of data, and the core data of our enterprise is placed in the database. Now large-scale WEB applications use multi-tier structure, such as typical three-tier, user interface layer, data logic layer, data layer. And the data layer, and the data layer of our entire WEB application performance is very large, do not understand the basic knowledge of the database, how can we carry out performance testing and analysis? How do you know if the performance bottleneck is the cause of the database, and how to tune the system? For example, the design of the database model is unreasonable, a bad SQL statement can affect the performance of the whole WEB application, so it is necessary to be familiar with the basic knowledge of SQL statements, table building, indexing, stored procedures, transactions, triggers, concurrency and so on.
It's a long journey, and I won't stop pursuing: the difficulty in performance testing is not the Loadrunner tool itself, but the overall grasp of the whole system, and you have to have a wealth of knowledge. It is not possible to do performance testing after learning how to use LoadRunner well. At present, the domestic performance testing field is in the initial stage, in order to do a good job in performance testing, we need to learn more knowledge, technical and non-technical. The road to performance testing is full of challenges as well as opportunities. But as Mr. Lu Xun said, there is no road in this world, and when there are many people walking, it becomes a road. Finally, I hope that enthusiasts who love performance testing can make a splash or soar on this road.
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: 301
*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.