ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 72 - CTFL4 discussion

Report
Export

A program got 100% decision coverage in a test. Which of the following statements is then guaranteed to be true?

A.
Every executable statement Is covered.
Answers
A.
Every executable statement Is covered.
B.
Every output equivalence class has been tested.
Answers
B.
Every output equivalence class has been tested.
C.
Every input equivalence class has been tested.
Answers
C.
Every input equivalence class has been tested.
D.
The 'dead' code has not been covered.
Answers
D.
The 'dead' code has not been covered.
Suggested answer: A

Explanation:

If a program got 100% decision coverage in a test, then it is guaranteed that every executable statement is covered. Decision coverage (also known as branch coverage) is a type of structural coverage (also known as white-box coverage) that measures how many decision outcomes have been exercised by a test suite. A decision outcome is a possible result of a decision point (such as an if-then-else statement) in a program's code. Decision coverage requires that each decision point has both true and false outcomes executed at least once by a test suite. Decision coverage implies statement coverage, which is another type of structural coverage that measures how many executable statements have been executed by a test suite. Statement coverage requires that each executable statement is executed at least once by a test suite. Therefore, if a program got 100% decision coverage in a test, then it also got 100% statement coverage in a test, which means that every executable statement is covered. The other options are not guaranteed to be true if a program got 100% decision coverage in a test. Every output equivalence class has been tested and every input equivalence class has been tested are not guaranteed to be true if a program got 100% decision coverage in a test, because equivalence classes are based on functional requirements or specifications, not on code structure or logic. Equivalence classes are used in specification-based testing (also known as black-box testing), which is a type of testing that does not consider the internal structure or implementation of the system under test. Decision coverage is used in structure-based testing (also known as white-box testing), which is a type of testing that considers the internal structure or implementation of the system under test. Therefore, achieving 100% decision coverage does not imply achieving 100% equivalence class coverage. The ''dead'' code has not been covered is not guaranteed to be true if a program got 100% decision coverage in a test, because dead code (also known as unreachable code) is code that can never be executed due to logical errors or design flaws. Dead code can reduce readability and maintainability of the code, as well as increase complexity and size. Decision coverage does not account for dead code, as it only considers the decision outcomes that are possible to execute. Therefore, achieving 100% decision coverage does not imply that the dead code has not been covered. Verified

Reference:A Study Guide to the ISTQB Foundation Level 2018 Syllabus - Springer, page 36.

asked 18/09/2024
Kevin Intriago
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first