-
Statement testing
- Statement testing exercises the executable statements in the code
-
Coverage
- is measured as the number of statements executed by the tests divided by the total number of executable statements in the test object, normally expressed as a percentage
-
Applicability
-
This level of coverage should be considered as a minimum for all code being tested
-
Limitations/Difficulties
-
Decisions are not considered
- Even high percentages of statement coverage may not detect certain defects in the code’s logic
-
Decision testing
- Decision testing exercises the decisions in the code and tests the code that is executed based on the decision outcomes
-
Coverage
- is measured as the number of decision outcomes executed by the tests divided by the total number of decision outcomes in the test object, normally expressed as a percentage
-
Applicability
- This level of coverage should be considered when the code being tested is important or even critical
-
Limitations/Difficulties
- when time is an issue
- fail to detect defects caused by combinations of conditions
-
Modified Condition/Decision Coverage (MC/DC) testing
- MC/DC testing considers how a decision is made when it includes multiple conditions
-
Coverage
- Assuming N unique, independent atomic conditions, MC/DC can usually be achieved with N+1 unique test cases
-
Applicability
- it is used when testing software where a failure may cause a catastrophe
-
Limitations/Difficulties
- there are multiple occurrences of a variable in a decision with multiple conditions
-
Multiple Condition testing
-
to test all possible combinations of atomic conditions (N) that a decision may contain
- 2^N
-
Coverage
- the number of unique condition combinations executed by the tests divided
by the total number of condition combinations in the test object
-
Applicability
- for software which is expected to run reliably without crashing for long periods of time
-
Basis Path testing
- consists of identifying paths through the code and then creating tests to cover
them
-
Applicability
- critical software
-
Coverage
- full coverage of all the linearly independent paths and the number of paths should match the cyclomatic complexity for the code