Control Structure Testing
Control structure testing is a part of White Box Testing. It includes the following methods:
- Conditional Testing
- Loop Testing
- Data Validation Testing
- Branch Testing/Path Testing
Conditional Testing
It is an approach to design test cases to exercise the logical conditions contained in a program module of an application.
Loop Testing
Loop testing is a white box testing technique that focuses exclusively on the validity of a loop construct.
Types of Loops
- Simple Loop
- Nested Loop
- Concatenated Loop
- Unstructured Loop
Graphical Image of Types of Loops
Simple Loop Testing
A simple loop is tested in the following way:
- Skip the entire loop.
- Make 1 pass through the loop.
- Make 2 passes through the loop.
- Make m passes through the loop where m<n, n is the maximum number of passes through the loop.
- Make n, n-1, n+1 passes through the loop.
Nested Loop Testing
A nested loop is tested in the following way.
- Start the innermost loop.
- Conduct a simple loop test for the innermost loop.
- Work outward, conducting a test for the next loop keeping all other loops at a minimum.
- Continue until all the loops are tested.
Concatenated Loop Testing
To test the concatenated loops, the procedure is if the loops are independent then test them as simple loops otherwise test them as nested loops.
Unstructured Loop Testing
To test the unstructured loops we needs to restructure their design.
Data Validation Testing
In data validation testing it selects the test paths of a program according to the locations of definitions in the program. In this type of testing the each statement in a program is assigned a unique statement number and each function does not modify its parameter or global variables. In this type of testing the tester checks for the data which is calculated during the navigation on a different page and it is also known as data flow.
Branch Testing/Path Testing
A branch is the outcome of a decision, so branch testing simply measures which decision outcomes have been tested. In this testing it takes a more in-depth view of the source code.