Learning about the performance test

1. Performance testing how to do?

Answer:

 For example, my xxx project performance testing is done like this:

 1. do the performance requirements analysis, user selection of the most frequently used function to do performance testing, for example: login, search, submit orders, identify performance indicators, such as: transaction rate of 100%, 90% of the transaction response time of less than 5 seconds, 1,000 concurrent users, CPU and memory use rate of 70% (*)

 2. Select the Performance Test Plan, a clear test of time (usually, such as after the first round of testing after the function and stability) and test environments and test tools

3. write performance test cases

 4. Performance testing environment set up, ready for performance test data (*)

 5. Adoption of performance test cases, test scripts write performance

 6. performance test scripts to tune checkpoint, parameterization, association, assembly point, affairs, think time adjustment, removing redundant scripts (*)

 7. design performance test scenarios, using nmon tools to monitor server, run the test scene (*)

 8. analysis of performance test results, if there are problems (bottlenecks), collect the logs to the developer to modify the bill of lading (*)

9. develop modified good performance regression testing (*)

10. Write performance test report (*)

 2. How to determine the maximum number of users the system can carry?

Answer: By load testing, increasing the number of users, with the number of users increases, the performance indicators will be consequential changes, when there is a performance inflection point, for example, when the number of users reaches a certain magnitude, the response time of a sudden increase , then the number corresponding to the user at the inflection point is the maximum number of users the system can carry.

 3. What are your local system (which functions) to do performance testing?

 Answer: We use the users most frequently used function to do performance testing, for example: login, search, submit the order.

4. your number of concurrent users is how determined?

Answer:

 1), the electricity supplier (for Internet users) of the system, we will be first on line for some time, were estimated based on user access to the data collected.

 2) From the demand.

 5. Where do you test the performance?

Answer: We will build a separate set of performance test environment for testing.

 6. What time do you test performance?

 Answer: After functional testing, system more stable when to do.

***********************************************

 7. How to analyze performance test results?

 Answer: ideas: first look at the results overview, see if there is a large area of ​​the failed transaction, there is not a lot Error number, the number of virtual users do not load properly, whether CTR and HTTP response curvature of the same, if normal, indicating that the test results credible, we can continue to analyze other performance indicators, such as, an acknowledgment response time, transaction rate, CPU and other indicators of whether or not to meet the demand; if the test results can not be trusted, to analyze the cause of the exception, re-tested after modification.

 After determining the performance test results credible, if we find the following problem, according to the following ideas provided to locate the problem:

One problem: the response time is not up

Analysis of ideas: add "Web Page Breakdown graphs", select the transaction to be broken down, select the "Time to First Buffer," the firm view time spent in the main transmission network or server, if the network is, on the combination Throughput (network throughput amount) of FIG, bottleneck bandwidth is calculated, if there is a bottleneck, it is necessary to consider increasing the bandwidth, or data transmission is compressed; bottleneck if not present, then the network may be due to unstable. If time is mainly consumed on the server, it is necessary to see each CPU, memory usage is too high web server and database server, because of high CPU, memory will certainly cause the response time is too long, if the problem is a web server , put on a web server corresponding to the user operation corresponding to log taken down, sent to the developing orientation; If the database is a problem, then the corresponding database server corresponding to log on to take down the development of distributed positioning.

 --------- encounter the following questions, you could say: to take down the server logs sent to the corresponding location of the development

 Question two: web server CPU performance test indicators over

Analysis ideas: log put the user operation corresponding to the web server corresponding to down, and the development of distributed positioning.

 Question three: a database of more than CPU performance test indicators

Analysis of ideas: the corresponding database on the server logs corresponding to take down the development of distributed positioning.

Question 4: Memory Leak

Analysis of ideas: the memory heap data taken down in the MAT analysis tool which object consumes the most memory, and then sent to the development of positioning.

Question 5: program running in single-user scenario is successful, multi-user operation is a failure, suggesting Rom server.

 The reason: the program does not do multithreading.

 Question six: Realize the function that randomly assign tasks to different users, single-user runtime can successfully allocated; when the multi-user application tasks, users get all the tasks are the same.

 The reason: there is a problem of thread synchronization program.

 ***********************************************

8. If the performance test script error occurs, analyzes it from what?

Answer: By examining the log replay, the positioning location of the error, and then make changes responses.

Script error occurred while playing back the script, there are two reasons, first, syntax error, such as accidentally punched a multi accord; second, not associated with the left and right borders set, leading to failed association; if you are running scene when, Tip script error, the general is a list of the last line of argument did not enter, or greater than a carriage return, or the parameter value is not enough.

 9. How to determine the performance of the system is getting better or worse

Answer: When doing regression testing, see System TPS is not increased.

10. Is your performance testing requirements where they come from?

Answer: Some documents on our needs, but sometimes is not reasonable, we may need to discuss and BA. For instance, when I did a performance test OA system within a company previously used, requiring 200 concurrent users, we do not have the entire company of 100 people, obviously, do 200 concurrency is not necessary, then, we only had 50 concurrency.

 11. How to achieve 200 concurrent users?

Answer: first add a collection point in front of the corresponding request script, and then in the set point in the controller's policy is set to wait until the release of 200 people arrive at the rendezvous point in the release.

 12. Under what circumstances do association, the association is how to do?

 Answer: When the script requires the server to return the value associated with it. (Step associated manual - you can reply: recording two scripts, contrast values ​​required to find the associated correlation function is inserted before the return value of the function, replacing all values ​​in the script with dynamic correlation function name)

13. There verification code function, how to do performance testing?

 Reference Answer: 1), the codes temporarily blocked, the performance test is completed, and then resume. Note: Shielded verification code will not affect to the performance test results.

 2) using a universal codes.

14.LoadRunner What are the components?

 Answer: 1, script generator Virutal User Generator Virutal User Generator referred VuGen, based recording provides a visual graphical development environment makes it easy to generate simple scripts for load performance.

 2. Pressure Monitoring System Controller is responsible for scheduling and set the whole process load, specifying ways and cycle load while providing the functionality of system monitoring.

3, the results of analysis tools Analysis we can sort out the analysis of relevant data load generated by Analysis.

 4. Load Generator Load Generator Load Generator referred to as LG, responsible for copying a large number of virtual users to generate load on the system VuGen script.

15. DESCRIPTION step using Loadrunner

 Answer: New Script - Select protocol - Script recording settings - recording a script - debug scripts - scene design and operation - analytical results.

16, you have to do is to test the performance of the foreground or background?

Answers: BS project: we do this project is the performance of back-end server, the browser not do performance testing; APP projects: mobile terminal and the performance of the server are done, the phone side we are using monkey (or AppPerformace) to do, the server side, we have to do is Jmeter

17, performance testing index What?

 

Script After recording, you need to make the appropriate enhancements to meet the testing requirements, usually enhanced following points:

 1, whether to do a parameterized

2, whether to do association

3, whether to add the transaction

 4, whether to add a checkpoint

 5, whether to add a collection point

6, adjust the thinking time

LoadRunner works: The performance test will simulate a large number of users to initiate a request to the system



Author: cium Hong
link: https: //www.jianshu.com/p/e4453cc79ee8
Source: Jane book
Jane book copyright reserved by the authors, are reproduced in any form, please contact the author to obtain authorization and indicate the source.

Guess you like

Origin www.cnblogs.com/buruoxi/p/11343920.html