nerdexam
iSQI

CTAL-TTA_001 · Question #27

The developers have suggested test set A is adequate to test the program opposite: When executing test set A through the program which statements are exercised? 2 credits [K3]

The correct answer is D. All, but statement 22, 27, 28 and 29. Option D is correct because when tracing test set A through the program, two separate branches are never triggered: the branch containing statement 22 (likely a condition whose alternate path is never taken by any test case in set A), and the block containing statements 27, 28…

Structure-Based Testing

Question

The developers have suggested test set A is adequate to test the program opposite:

When executing test set A through the program which statements are exercised? 2 credits [K3]

Exhibit

CTAL-TTA_001 question #27 exhibit

Options

  • AAll
  • BAll, but statement 22
  • CAll, but statement 27, 28 and 29
  • DAll, but statement 22, 27, 28 and 29

How the community answered

(24 responses)
  • A
    8% (2)
  • B
    17% (4)
  • C
    4% (1)
  • D
    71% (17)

Explanation

Option D is correct because when tracing test set A through the program, two separate branches are never triggered: the branch containing statement 22 (likely a condition whose alternate path is never taken by any test case in set A), and the block containing statements 27, 28, and 29 (likely a conditional block, such as an else or error-handling path, that no test case in set A enters). This means four statements in total are skipped, leaving statement coverage incomplete.

Why the distractors fail:

  • A is wrong because test set A does not achieve 100% statement coverage - the whole point of the question is to identify the gaps.
  • B is wrong because it only accounts for the missing statement 22, ignoring that statements 27–29 are also unexercised.
  • C is wrong because it only accounts for the missing block (27–29), ignoring statement 22.

Memory tip: Think of it as two separate "dead zones" in the code that test set A never enters - one lone statement (22) and one small block (27–29). When you see a question like this, systematically trace each test case through every branch and mark which statements get hit; the uncovered ones across all test cases combined give you your answer. If you miss either dead zone, you'll pick B or C instead of D.

Topics

#statement coverage#control flow#coverage analysis#test adequacy

Community Discussion

No community discussion yet for this question.

Full CTAL-TTA_001 Practice