| Decision Coverage | | Print | |
|
This metric reports whether boolean expressions tested in control structures (such as the if-statement and while-statement) evaluated to both true and false. The entire boolean expression is considered one true-or-false predicate regardless of whether it contains logical-and or logical-or operators. Additionally, this metric includes coverage of switch-statement cases, exception handlers, and interrupt handlers. Also known as: branch coverage, all-edges coverage, basis path coverage, decision-decision-path testing. "Basis path" testing selects paths that achieve decision coverage. This metric has the advantage of simplicity without the problems of statement coverage. A disadvantage is that this metric ignores branches within boolean expressions which occur due to short-circuit operators. For example, consider the following C/C++/Java code fragment: if (condition1 && (condition2 || function1())) statement1; else statement2; This metric could consider the control structure completely exercised without a call to function1. The test expression is true when condition1 is true and condition2 is true, and the test expression is false when condition1 is false. In this instance, the short-circuit operators preclude a call to function1.
Set as favorite
Bookmark
Email this
Hits: 2015 Comments (0)
![]() Write comment
|
| Related Articles: |
|---|
|
Software Testing
- Introduction to Software Testing
- Automated Software Testing
- Different Types Of Software Testing
- Software Testing Levels
- Software Testing Tools
- Software Performance Testing
- Web Testing Techniques
- Software Security Assurance
- Software Testing Certification
- Testing Check Lists
- Software QA Testing Career
- SOA and Web Services Testing
Decision Coverage