Trail: pathtesting

Performance Testing : pathtesting

KnowledgeBase :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

Path Testing

Path testing has been one of the first test methods, and even though it is a typical white box test, it is nowadays also used in black box tests. The procedure itself is similar to the walk-through. First, a certain path through the program is chosen. Possible inputs and the correct result are written down. Then the program is executed by hand, and its result is compared to the predefined. Possible faults have to be written down at once.
There are different strategies about how to choose the path. The optimum would certainly be to follow each path through the module once, but this is not possible:

Assume there is a little program which consists of a loop that is executed twenty times. Inside this loop are a case or some if instructions which allow ten different routes. The total number of paths trough this little program would be 1020. Definitely nobody is able to trace this huge amount by hand.

Since the best solution is not possible, it is necessary to reduce the number of possibilities. There is no perfect solution to this problem, and those strategies should only be understood as hints for the "scout" -- a human tester :

In doubt prefer the shorter way out.
Choose the path which involves less variables first.
Use each instruction at least once.
Do not ignore the important paths -- even if they seem complex.
Do not look over parts which seem to be difficult to understand.
Last, but not least: trust your intuition.

It is also important to keep in mind that, due to the fact that conditions in a program are normally not completely independent of each other, not all paths are possible. For instance, there are only two different routes through the following program:

if (C) {
instruction block A1
} else {
instruction block A2
if (C) {
instruction block B1
} else {
instruction block B2

Assuming that the instruction blocks A1 and A2 do not influence the condition C then, regardless of whether the condition C is true or false, the paths A1-B2 and A2-B1 will never be used.


There are no comments on this page. [Add comment]

Page History :: 2010-01-04 14:54:37 XML :: Owner: Roland Stens :: Search:
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki
Page was generated in 0.0119 seconds