Software Testing Techniques

Black box testing techniques
a. Equivalence Partitioning.
b. Boundary Value Analysis.
c. Cause-Effect Graphing.
d. Error-Guessing.

Equivalence Partitioning

Equivalence partitioning is a software testing related technique with the goal:
1. To reduce the number of test cases to a necessary minimum.
2. To select the right test cases to cover all possible scenarios.
Following example of a function has the pass parameter "month" of a date. The valid range for the month is 1 to 12, standing for January to December. This valid range is called a partition. In this example there are two further partitions of invalid ranges. The first invalid partition would be <= 0 and the second invalid partition would be >= 13.

........ -2 -1 0 1 ....................... 12 13 14 15 ...............
invalid partition 1 valid partition invalid partition 2

It is sufficient to select one test case out of each partition to check the behavior of the program. The values within one partition are considered to be "equivalent". Thus the number of test cases can be reduced considerably. Equivalence partitioning is no stand alone method to determine test cases. It has to be supplemented by boundary value analysis.

Boundary Value Analysis
Boundary value analysis is a software testing related technique to determine test cases covering known areas of frequent problems at the boundaries of software component input ranges.

To set up boundary value analysis test cases you first have to determine which boundaries you have at the interface of a software component. This has to be done by applying the equivalence partitioning technique. Boundary value analysis and equivalence partitioning are inevitably linked together. For the example of the month in a date you would have the following partitions:

......... -2 -1 0 1 ...................... 12 13 14 15 .....
-------------- ---------------------------------------
invalid partition 1 valid partition invalid partition 2

Applying boundary value analysis you have to select now a test case at each side of the boundary between two partitions. The boundary value analysis can have 6 text cases: n, n-1, n+1 for the upper limit and n, n-1, n+1 for the lower limit.

White-Box testing techniques
a. Statement coverage
b. Decision coverage
c. Condition coverage
d. Decision-condition coverage
e. Multiple condition coverage
f. Basis Path Testing
g. Loop testing
h. Data flow testing

Related Testing Topic
a. Black Box testing

No comments:

Post a Comment