1. The Selection of Appropriate Test Data

Test data sets should be selected to test different processing scenarios. These different scenarios are designed to ensure every statement is executed (statement coverage testing) and every boundary condition is tested (decision coverage testing). Furthermore, the order in which statements are executed will affect the processing therefore every path through the algorithm or code must be executed by our test data if we are to be sure of its correctness; this is known as path coverage testing. Of course we must also know the expected output for each set of test data if we are to accurately assess the results of our analysis.

Statement, decision and path coverage tests are not mutually exclusive, in fact path coverage testing always includes statement coverage testing. For this reason we need not consider statement coverage testing in detail. Be aware that it is used to significantly reduce the number of test cases; albeit with reduced effectiveness. Actually statement coverage tests are more often used to find code that can never be executed rather than to test the code’s correctness. Many large software products that have been revised over numerous years can contain large amounts of redundant code