ISTQB 연습문제 풀이 - Exam A : Q#24



1. Question

Your test suite achieved 100% statement coverage. What is the consequence of this fact?

  • a) Each instruction in the code that contains a defect has been executed at least once
  • b) Any test suite containing more test cases than your test suite will also achieve 100% statement coverage
  • c) Each path in the code has been executed at least once
  • d) Every combination of input values has been tested at least once

✅ Correct Answer: a)

2. Key Concept – What 100% Statement Coverage Means

Statement coverage measures the percentage of executable statements in the code that have been executed by at least one test case.

문장 커버리지(statement coverage)는 테스트 실행 중에 실행된 “코드 문장(실행 가능한 구문)”의 비율을 의미합니다. 100%라는 것은 “모든 실행 가능한 문장이 적어도 한 번은 실행되었다”는 의미입니다.

3. Option Analysis (EN/KR)

a) Each instruction in the code that contains a defect has been executed at least once

✔ Correct.

If statement coverage is 100%, every executable statement has been executed at least once. So, any statement that contains a defect has also been executed at least once (하지만, 그 결함이 반드시 발견되었다는 뜻은 아님).

문장 커버리지가 100%라는 것은 모든 실행 가능한 문장이 최소 한 번 실행되었다는 의미입니다. 따라서 결함을 포함한 문장도 한 번 이상 실행되었습니다. 단, “결함이 발견되었다”가 아니라 “실행되었다”는 점이 포인트입니다.


b) Any test suite containing more test cases than your test suite will also achieve 100% statement coverage

❌ Not correct.

Coverage depends on what is tested, not on how many test cases you have.

Example: if (x == 0) y = 1;
One test with x = 0 → 100% statement coverage. Two tests with x = 1 and x = 2 → 0% statement coverage.

테스트 케이스 개수가 많다고 해서 커버리지가 자동으로 올라가는 것은 아닙니다. 무엇을 실행했는지가 중요하지, 몇 개를 실행했는지는 중요하지 않습니다.


c) Each path in the code has been executed at least once

❌ Not correct.

Even 100% statement coverage does not guarantee full path coverage, especially if the code contains loops or multiple branches.

문장 커버리지가 100%라고 해서 모든 경로(path)를 실행한 것은 아닙니다. 루프나 여러 조건 분기가 있으면 가능한 경로가 매우 많거나 사실상 무한할 수 있습니다.


d) Every combination of input values has been tested at least once

❌ Not correct.

Statement coverage says nothing about how many input combinations were tested. You can get 100% statement coverage with a single test input in very simple code.

문장 커버리지는 입력 조합 개수와는 관계가 없습니다. 아주 단순한 코드에서는 입력 1개만으로도 100% 문장 커버리지를 달성할 수 있습니다. 즉, 모든 입력 조합을 테스트했다는 의미가 전혀 아닙니다.


4. Summary

  • 100% statement coverage → 모든 실행 가능한 문장이 최소 한 번 실행됨
  • 하지만, 모든 결함 발견을 보장하지는 않음
  • 또한 모든 경로, 모든 분기, 모든 입력 조합을 테스트했다는 의미도 아님
  • 정답: a)

이 문제는 “문장 커버리지가 무엇을 보장하고, 무엇을 보장하지 않는지”를 정확히 이해하고 있는지 확인하는 전형적인 ISTQB 문제입니다. FL-4.3.1


Related: More ISTQB Posts

다음 이전