Basic method for comprehensive testing

zhaozj2021-02-08  424

Basic method for comprehensive testing

(This article is reproduced from Software Engineering Expert Network

Www.21cmm.com)

There is often such a situation, and each module can work separately, but these modules are integrated to work together. The main reason is that the modules will introduce many new issues when they call each other. For example, the data can be lost by an interface; a module may cause no impact on another module; several sub-function combines that the main function is combined; the error has accumulated to achieve unacceptable levels; the overall data structure has an error, and so on. The comprehensive test is a system testing technology for assembly software. After assembling each module of the unit test, a comprehensive test is performed to discover various errors related to the interface. A designer is accustomed to assembling all the modules all in the design, and then performs overall testing, which is called non-increasing integration. This method is prone to confusion. Because of the test, a lot of errors may be found, which is very difficult to correct and correct, and can introduce new errors while correcting an error, and new and old mistakes are mixed, it is more difficult to determine the causes and positions of the error. In contrast, the incremental integrated method is extended, and the program is extended. The scope of the test increases in one step, and the error is easy to position and correct. The interface test can also be completely thorough. Two incremental integrated methods are discussed below. 1 Since the top-down integration of the top-down integration is an incremental method of constructing the structure structure. It starts from the main control module, according to the software control hierarchy, with a depth priority or breadth priority strategy, gradually put each module. Integrated together. The depth priority policy is first integrated together on the module on the main control path, as for which path is selected as the main control path, which has a randomness, generally determined according to the characteristics of the problem. The following figure is an example. If the left path is selected, the modules M1, M2, M5, and M8 are first integrated, and then the M6 ​​is integrated, and then the path of the middle and right is considered. The breadth priority strategy will move downward along the control hierarchy. Still the following picture, it first integrates M2, M3, and M4 with the master module, and then integrated M5 and M6 and other modules. The specific steps of the self-top-down comprehensive test are: 1 Replace all the pile modules introduced by the main control module as the test drive module, replace all pile modules introduced when the main control module is tested; 2 According to the selected integration strategy (depth priority Or breadth priority), only replacing a pile module each time; 3 Each integrated module is immediately tested again; 4 After each group of tests are completed, it will be replaced with a pile module; 5 To avoid introducing new mistakes, it must constantly return Test (i.e., all or partially repeating the tests have been tested). From the second step, the above steps are generated until the entire program structure is completed. In the figure below, the solid line represents a partially completed structure. If a depth priority policy is employed, the next step will replace the pile module S7, of course, the M7 itself may have a pile module, and then the corresponding actual module will be replaced one by one . The advantage of self-top-down integration is that the main control and decision mechanism of the program can be tested as soon as possible, so it has been found earlier. The disadvantage is that when testing a higher layer module, the low-level processing uses a pile module to replace the real situation, and the important data cannot be forwarded to the upper module in time, so the test is not sufficient. There are several ways to solve this problem, the first is to postpone some tests after replacing the pile module with the real module, the second is the development of the pile module that can simulate the real module; the third is the upward integrated module. The first method retracted into a non-increasing integrated method, making the error in positioning and correcting, and lost the possibility of some specific tests in the assembly module; the second method is undoubtedly increased; third The method is more practical, and it is discussed below.

转载请注明原文地址:https://www.9cbs.com/read-557.html

New Post(0)