Top players to help you organize your performance test method Daquan (important)

Top players to help you organize your performance test method Daquan

In the six months since, I continue to participate in the project or group version of the sole part of the performance test, and slowly some awareness, make a temporary accumulation, and we do an exchange.

Background demand performance testing in general from the following three conditions:

The first is the existing network performance problems, the project team carried out a special performance transformation. For example, an interface changes from the original modified into asynchronous synchronous call, or is replaced with a new api, as modified by the Protocol tcp udp protocol, in order to ensure the reliability of the new api replaced, require performance testing

The second is to do a new system, operators need a comprehensive pulse understand the processing capability of the system.

The third is with the rapid growth of the amount requested, and the system has never done performance testing, the project team to worry about system in the foreseeable short term will not carry, so they requested that the testers to conduct a comprehensive performance testing, to a copy of reference data

Depending on the context we often have different ways of preparation, but can generally be prepared to start from the following aspects.

1, a comprehensive understanding of the system overview

(1) The expected performance index:

For Twenty-two cases, there will be very clear existing network performance indicators, such as the previous test acs, is a new work system, it is clearly marked in the requirements specification needs to reach 1wtps. For the third case, we often need try to simulate the existing network, obtain data for operational reference.

Such as the recent test engine query limit, the test here is given a single svr processing power and data to support expansion parallel operation and maintenance are most concerned about.

(2) form a communication network and the interconnection between various systems:

Sometimes we just transform the performance of networks in a small system, which we need to figure out the location of this system fits into the overall logic processing.

figure 1

For the location of the system under test in the whole transaction, building design and test environment for test cases is critical

Secondly, also we need to know the communication between networking modules, tcporudp, synchronous or asynchronous invocation call, connection or short connection length.

Each logical branch (3) System:

Understand the logic of the branch system, mainly facilitate the design of test cases. In our actual work, time is always very limited, but a very important way we improve the efficiency is to pay attention to the design of use cases to understand the various branches of logic systems can be very accurate prepared to use cases and hit problems in essence, reducing the time to explore.

As an example, psc transformation performance version of the system (Figure 1), almost all of the business logic should go to query whether ssp limited, but we choose the simplest of a minimum of two branches presented by the surrounding system for testing using the shortest cost verification issues, to ensure a good progress of the test

(4) a combination of modules within the system:

More complex systems, will have their own module combinations. We need to understand the system consists of several modules, each module coupling relationship is like, not only for function test abnormal test case design helps a lot to help the performance test also should not be overlooked.

For a simple example: AQC system that is available for the outer query, the interior of the module broadly divided into: a network communication layer, the request distribution layer, functional layer processing. Network communication layer is the use of components of a communication network, processing the network communication, dispatch request distribution layer, the primary layer packet communication network according to different queues cmdcode distributed to the rear end of the functional layer processing, there is a functional treatment layer consisting of small svr each svr handle different queries.

If there is a current network performance requirements are found to have a branch query performance is not OK, then we need to quickly lock key modules, bottlenecks are likely to exist on the svr treatment of this branch.

Second, understanding the coupling between the various modules and system modules, in understanding the performance curve, adjust the test program is also important.

2, step on the quasi critical point, further root system

Performance system, but the most typical response time or throughput of an index, and there are many metrics we need attention, such as cpu, memory, IO, database connections, etc. operands, so we need further testing prior to dig the system, identify the following key points:

(1) memory allocation and use. Using message queues, the use of the cache

(2) files, network IO operation: large file read into memory, or the memory write and file, whether operating frequency

(3) cpu consumption operation: large memory such as some sort

(4) Operation of the database: frequent read and write operation of the database, and so frequent database connection

(5) network calls: network delay and concurrent connections

(6) Critical Resources: Is there a lock inappropriate behavior multiprocessing mode

(7)……

 

3, design test cases

Understanding of the above basic situation, in fact, we are in preparation for this step. Is particularly effort in solving the case of the first performance requirements, performance testers experienced in the understanding of the above situation can not even design test can determine where the problem lies! (Lisa boldly speculate about, although not yet reached that level)

Performance testing of functional testing test cases better than, a lot of abnormal test can be considered, because the cost is very small, and the implementation of a performance test cases often consume large resources and time, so precise performance test cases is very important.

Performance test case design, according to Lisa accumulation and summarize this time, the feeling can proceed from the following aspects.

(1) choose the most suitable logic branches test

Often have many branches meet your testing requirements, choice, you can start from the following points:. A minimum influence by the surrounding, B, minimal consumption of resources.

A point can help us quickly locate problems, and perhaps the entire branch logic system design there will be many, we can choose to branch peripheral systems involving minimal but may include the system under test, including the conduct, of course, the easiest way is to pressure test system can be directly measured, but this is some of the problems exposed not out.

Point B can help us save resources, such as already have an existing environment, in short, what I need is reduced, naturally high speed and efficiency, the new system or the old system performance has never been tested in limited time, we also need the actual situation, select the user requests the most important branch of the largest amount of testing.

(2) According to the foregoing analysis, design the most targeted, the most effective test

For example, I suspect that the cause of aqc system performance degradation is a new iteration of this large memory sort. For example aqc branch system has a user query out all cdkey then ordered by time, and all returned to the user.

So how do we let this problem get tested? In the design of the time can choose between two very extreme cases a combination of tests, one is for all users did not cdkey, the other is for all users contain 500 cdkey, the last is a combination of both, to compare the You can verify whether too much is because some users occasionally cdkey, resulting in an overall decrease in performance.

Of course, in the process of testing, we also need to adjust the test cases based on existing data to help us verify the conjecture, clearer positioning problem

(3) consult an experienced staff will always be a surprise performance test

In the case of limited experience, working under the pre-treatment and consult their predecessors, can not only improve efficiency, but also informative.

But I am afraid this is a lot of people overlook. Task, do not rush to start, ask often develop ideas.

4, test environment preparation

To set up the test environment is often determined based on test case design. For the initial system performance tests, our goal is to keep the same and the existing network. It can be mainly from the following aspects.

(1) Data: large amounts of data, and diversity analog data is often difficult. Large amounts of data need to write scripts to populate the database to a certain extent, if required high, even the method from the current network pilot data can be used.

Diversity is often more difficult to achieve, need to understand the diversity of data as well as the proportion of the existing network, to simulate the effect of

(2) network delay: the IDC and the company's management is very relevant machine before I always thought that all the machines are tested in a IDC, later discovered that it is not true, and our test machine also operate like machines, located in different IDC. and we in the selection of machine deployment, you need to look at the network delay between the current network operating machinery.

This is particularly important when testing the performance of a whole branch of logic.

(3) configuration: the number of log-level configuration, threads or processes, if conditions permit, the configuration can be upgraded to the hardware configuration of the machine, if you can be consistent natural best results.

There is a misunderstanding, I always thought the best before each test environment as much as possible and to move closer to the existing network, but later found that IBM is not doing so, the system had previously done for performance testing, often set of environmental or after (regardless of whether this environment before, and now the same network), and the test is to verify more of our system if there is a performance problem, think about the case with the last test surroundings are the same, the new version to replace existing iteration system performance degradation, do not explain the problem?

In everything is ready, then we can begin to prepare for the test tool to perform our test it ~ ~ ~ ~

 

Guess you like

Origin www.cnblogs.com/111testing/p/11863306.html