Principles of testing the structure of software modules

Lecture



The purpose of testing the structure of the PM is to check the correctness of the selected routes of using programs and detecting, mainly on the logic of route formation errors.
1 task, which is solved when testing the structure of programs - is to obtain information about the complete set of real routes of use in each program. Such a representation allows the constructiveness of the degree of verification of routes to be streamlined and prevents individual routes from being accidentally skipped. It is convenient to carry out the selection of tested routes using graph models of programs.
When planning the testing of the program structure, it is necessary to perform 2 tasks: 1) to form the criteria for allocating routes for testing; 2) choose a strategy for ordering the selected routes.
The criteria for allocating routes for testing meet the criteria for determining the structural complexity of the PM. The following 3 criteria are most often used: 1) the coverage of the program graph is minimal by the number of routes covering each arc of the graph at least once; 2) selection of routes for all possible combinations of arcs included in the routes.
Testing can be carried out according to one of the criteria or use successively more stringent selection criteria for routes. In real programs, part of the routes may not be feasible due to inconsistencies in the conditions. Cycles in programs lead to increases in the number of routes.
2 task. Route ordering strategies for testing should take into account the complexity of the route and tests to test them. The first step is to check the main group of routes. In the presence of limited resources, the allocation for testing, part of the routes may remain untested. The ordering of routes is based on the use of 3 characteristics of the PM: 1) the number of lines of text in the selected routes or the estimated duration of their implementation; 2) the number of alternatives (or if), determining the formation of each route; 3) the probability of using routes in the actual operation of the program.
With 1 strategy, the routes that are the longest in the number of lines of text and in time of use are subject to primary testing. These are usually routes with the largest amount of computation and variable conversion. This strategy is best used when testing programs that have a computational nature of data processing, with the largest number of logical conditions and routes for using programs.
In the second strategy, priority is given to the most difficult routes in terms of the number of conditional conditions being analyzed. Such a strategy is preferred when testing logic programs with a small amount of computation. When streamlining routes according to 3 strategies, the main difficulty lies in estimating the probability of branching in conditional jumps and switches, as well as in estimating the number of test cycles. This strategy allows you to more fully plan your testing and evaluate the level of smoothness of programs.
Planning to test the structure of the PM can be autonomous. The task of autonomous planning systems is to allocate program routes according to one or several criteria and their subsequent ordering according to a given strategy.


Comments


To leave a comment
If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Software reliability

Terms: Software reliability