Recently a lot of new friends, mostly new test or ready to do testing work, see a lot of new to come up to ask about the use of LoadRunner problems. The understanding of performance testing is not too clear. The company said to let them do a performance test of the system, they heard that LoadRunner is doing performance testing, in the Internet to find a point of the use of LoadRunner to start the system under the knife. This is ridiculous for the professional performance testers of some big companies, but it's a situation that I did when I was in the company.
When the performance test report was made, it seems that the report doesn't make any sense. Although, for me now, the performance test is just fur. But I still hope that through this article I will let those novices get a primer on performance testing.
----//Barber Shop mode
About understanding performance, remember I was watching "LoadRunner didn't tell you" three---barbershop mode "Whether you have seen it or not, I repeat the barber's mode.
Premise:
1. A barber shop with three barber
2. It takes an hour for each barber to have one hair.
3. Customers are very busy, from the barber shop up to only wait three hours (waiting time + barber time), if the three hours after the turn to their hair, immediately leave.
Thinking:
Here we understand the "best number of users" and "Maximum number of users".
Number of best users:
The barber's best condition, Barber's most income (Barber has no rest time, has been in the barber), the highest customer satisfaction (customers at any time to the manager, no need to wait). At a point in time, three barber chefs serve three customers, so the best number of users is three.
Maximum number of users:
The barber's biggest bear state, Barber's most income (Barber has no rest time, has been in the barber), the maximum customer endurance (to the customer waiting + barber needs to wait three hours).
If the barber shop business is very good, in the morning open a group of customers (many), A, B, c three customer first, D, E, F customers need to wait an hour to get the service of Barber, G, H, I three customers waited two hours to get service, behind the queue J, K, L .... And so customers, have been waiting for three hours have not received service, because this has reached the limit of their waiting, so after they angry and helpless to leave.
Of course, the barber shop will continue to come to new customers, has been waiting for three hours without service customers leave, but for the barber, they at a point in time, they can service the maximum number of users is nine (three are receiving services, three have been waiting for an hour, three have been waiting for two hours).
For the maximum number of users, there are two points to note:
1. In the barber shop is very large, can accommodate a lot of customers (more than 9), there is always a part of the wait here for three hours without the service to leave, do not wait for the three small but not service customers into the maximum number of users.
2. If the barber shop is small and can accommodate up to six customers, when the seventh customer comes, though, we know that he only has to wait two hours to get the service (the time is the waiting time he can accept), but due to the volume of the barber shop, this seventh customer only another day.
For more information about the barber shop principle, please visit http://www.cnblogs.com/jackei/archive/2006/11/20/565527.html
Do not know through the face of the barber shop analysis, you have some clues to the performance. If the barber shop is the equivalent of our system, the customer's request to the server, the best number of users and the maximum number of users is a way for us to measure the processing power of a system.
----//The mode to be billed
Note: It is self-seeking to modify, make a look! Oh
This is the example I used to tell a friend about the communication between the browser and the server, and it feels easier to understand than it is, so share it.
Assume:
1. A, B, c three persons.
2. C owes a money (not much to be considered here)
3. B is a specialized Yaozhang
Thinking:
Number of browser and server messages delivered:
A to B said, C owes me money, you help me to want. b After receiving the instruction, go to find C to ask for money.
b says to C, give me 20 bucks.
C said, No.
b says to C, give me 10 bucks.
C said, No.
b says to C, give me 5 bucks.
.........
Finally, B came back to a said, oh mom Ah, c that ya the penny stingy, no money.
For a, just to say, it just let B ask C for money, the specific interaction between B and c a few times, a is not known, it is known that B returned to its results, c a penny did not.
Size of data passed by browser and server:
Or the above process, A to B said, C owes me money, you help me to want. b After receiving the instruction, go to find C to ask for money.
b says to C, give me 200,000 bucks.
C said, no problem, no check, only 1 yuan coins.
..........
b finally get the money back to a. A very puzzled, how to go so long, b wronged said, ya, C gave me a whole pile of coins, too heavy, the road walk slowly, are almost exhausted me.
For a, just to say, it just let B ask C for money, who knows C is for a check or a coin. So, b It takes a long time to get the money.
Therefore, in order to improve the browser access to the server, you should reduce the number of data transmission and data transfer size.
This naturally leads to a browser cookie.
A in C where the deposit of 5 cents.
A to B said, I in C where the deposit of 5 cents, you go fetch me to see. B ran to ask C to 5 cents back to a look.
After a while, A and B said, I in C where the deposit of 5 cents, you go fetch me to see. B ran to ask C to 5 cents back to a look.
After a while, A and B said, I in C where the deposit of 5 cents, you go fetch me to see. This time C tired, to B said, you put the money in your pocket, and so a to, you ask me 5 Mao's RMB has no revision, no revision, you will directly pocket 5 cents to a look on the line.
In this case a is the equivalent of our users, B is the browser, and C is the server. The cookie is the pocket of B, and of course the cookie is much more useful. For example, we log on to a system that prompts us whether to save the password (some have a period such as one weeks or one months), if we save, the next time we visit the landing, the browser has helped us fill out the account password or directly to help us login. Then this account password is placed in our browser's cookie.
Why do you say the above example? Because most of our performance tests are based on the B/S architecture system, understanding the data transfer between the browser and the server helps us understand the performance test.
----//What do we need to know before starting a performance test?
When the customer or the boss called you, said to you, to our system to do a performance test, do not be silly to say "good!" "Then, gone, I had done so (at that time did not understand, a swollen face filled with fat), back to the seat, I do not know where to start."
So, what do we need to know?
1. Purpose of performance testing
First you need to know the customer's requirements.
I divide the performance test according to the purpose of the following several
1) customer has clear requirements
This is a good result, which means that customers have a certain understanding of performance testing and know what standards they need to achieve. such as: System requirements at the same time to meet the 100 user login, average per user login time can not exceed 5 seconds. This demand is very clear, of course, do not rule out some pretend users, to mention some unrealistic requirements.
Anyway, the user asked, this is relatively easy, you can do a performance test of the current system, as for, by optimizing the system or increase the hardware equipment to meet the requirements. It's not the question we're thinking about.
2) Just want to know the current system performance (capacity test)
Our goal is to find the maximum number of users and the best number of users. However, this is still a somewhat ambiguous requirement, and we need to analyze the system to find out the pressure points of the system.
3) identify system performance bottlenecks
This also requires analyzing the logical business that can cause bottlenecks in the system before performing performance testing.
4) The performance of the system under long-time pressure (strength test)
This general verification system stability, because once the system is online, it is possible to long-term access to large users, may not previously found some problems will be leaked out. More typical is memory overflow.
2. Environment for performance testing
The purpose of our testing is determined and of course we need to test the environment. The environment here, we need to consider a few points
1) Hardware Environment
We need to understand the hardware configuration of the tested server, the machine configuration of the pressurized client, CPU memory, etc.
2) Software Environment
We need to understand the architecture of the system under test, the front-end, the middleware, the server (this is the running system software server, such as Tomcat), the database, and their deployment location.
What performance testing tools are used to pressurize the client for pressurization.
3) network environment
The network environment is important. In the above several purposes, in addition to identifying system performance bottlenecks can be done on the WAN, because this purpose can not set up too many virtual users, just to find out where the system affects the performance of the entire system.
All other testing needs to be done in the local area network, or the requests sent by your stress tools will be stuck in the transmission of the network.
3. Find the pressure points of the system
We need to pressurize which page or business of the system. This is not what you think, it needs to communicate with developers. The homepage of the system? System's login? Or is the system trading process? What is the percentage of users in each business?
It is easy to find and locate pressure points only when effective performance needs are achieved.
Get the effective demand:http://www.cnblogs.com/jackei/archive/2006/12/12/589473.html
If the above points are clear, then open your Performance test tool and start recording (or writing) your performance test script!
"Go" What you need to know before doing a performance test