On the performance testing strategy and application scenarios

Faced with an increasingly complex business scenarios and different system architectures, requirements analysis and preparation of preliminary work, takes a lot of time. The test different strategies, but also on our test results comply with the expected goals.

This blog and talk about my personal understanding of the common performance testing strategy, as well as their application scenarios. . .

 

A common test strategy

Performance testing implementation process, for different business scenarios, after we go through analysis and modeling scene, will choose a different testing strategy. The following ten testing strategies, covering most of the scene.

1, concurrent test

Simulation client request, a request initiated by a certain amount per unit time while (S), verify that the system has the problem of concurrency.

PS : Do not no brain high concurrency! ! !

2, load testing

Increasing pressure request until the server is a resource which reached saturation (such as CPU utilization reaches 90% +), or some indicators have reached the safety threshold (such as operation and maintenance of monitoring alarm threshold or knee);

Load test (also called a stepped pressure measurement) they are used to looking for the inflection point of the performance , to verify whether the system running in different test environments both pressure request. Examples are as follows:

3, capacity testing

In load testing strategy, verify the maximum performance of the system under test in a conventional environment (the maximum acceptable performance, is not necessarily the best performance).

4, limit testing

Under the existing test environment, without regard to the limits of resource utilization (CPU utilization of 95% or higher Load IO extremely busy or value), the maximum processing capacity in the case of the system without downtime.

The PS : Because the system under different business scenarios, this strategy, using a relatively small rate.

5, configuration testing

Continuously adjust various aspects of system configuration (hardware, configuration parameters, etc.), to achieve optimal performance when the verification (optimum performance trade-off of various factors must be found balance) optimal configuration.

6, surge test

A concurrent verify certain period of time or a sudden increase request fluctuation amount is large, a stable system can normally provide services.

PS : This is also a relatively small test strategy used mainly for short-term uncertainty peak traffic influx scene (such as a micro-blog divorce, love, break up the topic).

7, stability test

(The number of concurrent result of the load test, CPU usage at the corresponding 70%) at a constant number of concurrent verify system performance in a mixed scenario.

8, Batch test

Verification system under test in both environments, batch processing system (usually a crontab or trigger the job) operational capacity can meet the business needs indicator of production.

9, high availability testing

In the case of multi-node cluster or distributed, destroy one or more cluster nodes, verify that the system can promptly restore service capabilities.

10, fault recovery testing

Verify the system can still maintain the ability to self-recovery capability to provide normal services or failure in the event of a failure. For example, the picture below:

The larger the area a1, the stronger the processing capacity of the system; a2 larger area, the better the stability of the system; a3 larger area, the better fault tolerance of the system (Gee, FIG somewhat ugly ...)

Before there are several hand animation performance model diagram, you can not find it embarrassing. . .

 

Second, the application scene

More than ten kinds of testing strategy, according to the applicable business & test scenarios, the use of the policy objectives and scenarios appear to divide the frequency for reference purposes only.

 

Third, the voice of experience

1, small and medium sized team: routine testing strategy selection: concurrency, load, capacity, configuration, batch processing, stability, high availability strategy that can cover most of the needs.

2, electricity supplier class of business: high concurrency, high availability, stability is a top priority.

3, business scenarios: In many cases a performance requirement contains several business scenarios, but concurrent, load, capacity, stability, adopt recommendations.

4. Demand scenario: requirements analysis and scenario modeling done, test results are often large deviation.

5, the pressure measurement environment: research environment selection, production and recommended configuration minimizes deployment environment, which is balanced by the cost and accuracy of the results.

6, the test data: either the amount or validity of data and data coverage of hotspot data, have determined that the test results can be worth.

7, construction technology: infrastructure (including environmental, service deployment, detailed monitoring system, process flow problem) is complete, to make performance tests left.

8, document construction: Be sure to pay attention to the construction of the document and data retention, to avoid a lot of unnecessary trouble and repetitive work.

9, platform: the role of the platform is to standardize processes and people work together efficiently integrate, do not over-pursue platform (but there must be technical planning and program preparation).

10, high concurrency do no brain! ! !

 

Guess you like

Origin www.cnblogs.com/imyalost/p/11204522.html