ISTQB 연습문제 풀이 - Exam B : Q#25

1. Question

Let the branch coverage metric be defined as: BCov = (X / Y) × 100%

What do X and Y represent in this formula?

  • a) X = number of decision outcomes exercised by the test cases
    Y = total number of decision outcomes in the code
  • b) X = number of conditional branches exercised by the test cases
    Y = total number of branches in the code
  • c) X = number of branches exercised by the test cases
    Y = total number of branches in the code
  • d) X = number of conditional branches exercised by the test cases
    Y = total number of decision outcomes in the code

✅ Correct Answer: c)


2. Understanding Branch Coverage

Branch Coverage is a white-box testing metric that measures whether every possible branch (i.e., every possible control flow transfer) has been executed at least once.

분기 커버리지(Branch Coverage)는 프로그램의 모든 “분기(브랜치)”를 최소 한 번 실행했는지 측정하는 화이트박스 커버리지 기법입니다.

✔ A branch = any transfer of control

  • Conditional branch → from decision outcomes (IF, WHILE, FOR)
  • Unconditional branch → straight-line control flow (next statement)

즉, 분기에는 조건 분기뿐 아니라 무조건 분기(unconditional)도 포함됩니다.


3. Why Option c) Is Correct

BCov = (X / Y) × 100%

  • X = number of branches executed by tests
  • Y = total number of branches in the code

This matches the ISTQB definition: Branch coverage = (executed branches) / (all branches)

ISTQB 공식 정의와 동일하게 X = 실행된 분기 수, Y = 전체 분기 수이므로 c)가 정답입니다.


4. Why the Other Options Are Incorrect

a) Counts only decision outcomes → ❌ excludes unconditional branches

결정 결과만 포함하므로 무조건 분기를 포함하지 않아 틀림.

b) X counts only conditional branches → ❌ incomplete

조건 분기만 세면 전체 분기(branch)의 개념과 다름.

d) Both X and Y ignore unconditional branches → ❌ incorrect basis

둘 다 조건 분기만 고려하므로 잘못된 분기 정의.


5. Summary

  • Branch = any control flow change (conditional + unconditional)
  • Branch Coverage = executed branches / total branches
  • Therefore: option c) is correct

분기 커버리지는 “실행된 모든 분기 ÷ 전체 분기”이므로 정답은 c)입니다. FL-4.3.2


Related: More ISTQB Posts

다음 이전