Kvalitet i testiranje softvera

Coverage - Paths

Sadržaj:


Koristan materijal:


Testiranje potpunim pokrivanjem putanja

Pokrivanje linearno nezavisnih putanja

Koristan materijal:


engl. Linearly Independent Paths Testing

The first step is to pick a functional “baseline” path through the program that represents a legit- imate function and not just an error exit. The selection of this baseline path is somewhat arbi- trary. The key, however, is to pick a representative function rather than an exceptional condition. The exceptional conditions will of course be tested on some path generated by the method, but since many of the decision outcomes along the baseline path tend to be shared with several other paths it is helpful to make them as “typical” as possible. To summarize, the baseline should be, in the tester’s judgement, the most important path to test. It is usually helpful to devote extra effort to the baseline path, exercising all its functional requirements and developing several data sets that might expose errors. To generate the next path, change the outcome of the first decision along the baseline path while keeping the maximum number of other decision outcomes the same as the baseline path. That is, once the baseline path is “rejoined,” it should be followed to the module exit. Any decisions encountered that are not part of the baseline path may be taken arbitrarily, and, as with the baseline path, it is a good idea to follow a robust functional path subject to the con- straint of varying just the first baseline decision. To generate the third path, begin again with the baseline but vary the second decision outcome rather than the first. When all of the deci- sions along the baseline have been flipped, proceed to the second path, flipping its new deci- sions as if it were the baseline. When every decision in the module has been flipped, the test path set is complete. Multiway decisions must of course be flipped to each of their possible outcomes in turn. Izvor: mccabe.com PDF (strana 42)

Testiranje petlji

Pokrivanje LCSAJ sekvenci

Koristan materijal:

Granično testiranje unutrašnje petlje

Koristan materijal:


engl. Boundary Interior Adequacy ili Boundary Interior Coverage

… In other words, we follow each path in the CFG up to the first repeated node.

Boundary interior coverage (“Grenze-Inneres-Überdeckung”) classifies paths through a loop by the number of loop executions. Normally, three classes are defined: (1) A class for all paths that do not execute the loop. (2) A class for all paths that execute the loop exactly once. (3) A class for paths that execute the loop at least two times. It should be clear, that for a do-while-loop, the class according to (1) is empty. Variations of this definition exist. The effort to reach 100% boundary interior coverage is high in every case. Izvor: hitex