Subscribe by Email

Monday, November 23, 2009

Control Structure Testing : Loop testing

Loops are the basis of most algorithms implemented using software. However, often we do consider them when conducting testing. Loop testing is a white box testing approach that concentrates on the validity of loop constructs. Four loops can be defined: simple loops, concatenate loops, nested loops, and unstructured loops.

- Simple Loops, where n is the maximum number of allowable passes through the loop.
o Skip loop entirely.
o Only one pass through loop.
o Two passes through loop.
o m passes through loop where m o n-1, n, and n+1 passes through the loop.
- Nested Loops
o Start with inner loop. Set all other loops to minimum values.
o Conduct simple loop testing on inner loop.
o Work outwards.
o Continue until all loops tested.
- Concatenated Loops
o If independent loops, use simple loop testing.
o If dependent, treat as nested loops.
- Unstructured loops
o Don't test - redesign.

Types of Loop

No comments:

Facebook activity