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


1. Introduction

This question evaluates your understanding of State Transition Testing and how many test cases are required to achieve valid transitions coverage.

이 문제는 상태 전이 테스트(State Transition Testing)에서 유효 전이(Valid Transitions) 커버리지를 만족시키기 위해 필요한 최소 테스트 케이스 수를 묻는 문제입니다.

2. Context

You test a system whose lifecycle is modeled by the state transition diagram shown below.
The system starts in the INIT state and ends its operation in the OFF state.
What is the MINIMAL number of test cases to achieve valid transitions coverage?
a) 4 b) 2 c) 7 d) 3

The system:

  • Starts in INIT state
  • Ends in OFF state
  • Contains multiple transitions such as run, test, pause, resume, error, done

시스템은 INIT에서 시작해 OFF에서 종료되며, 여러 전이가 존재합니다. 문제는 “모든 유효 전이(valid transitions)”를 최소 몇 개의 테스트 케이스로 커버할 수 있는지 묻습니다.

3. Key Insight

✔ Certain transitions cannot appear in a single test case

Based on the state diagram (described in the solution):

  • The two done transitions cannot occur in the same test case
  • The test and error transitions also cannot occur together

상태 구조상 다음 조합은 하나의 테스트 케이스에서 동시에 발생할 수 없습니다:

  • 두 개의 done 전이
  • test 전이와 error 전이

➡ Therefore, at least **three** test cases are required

따라서 모든 유효 전이를 커버하려면 최소한 3개의 테스트 케이스가 필요합니다.

4. Example Minimal Test Suite

Test Case Transitions Covered
TC1 test → done
TC2 run → error → done
TC3 run → pause → resume → pause → done

✔ Together, these 3 test cases cover all valid transitions.
✔ 이 세 개 테스트로 모든 유효 전이를 커버할 수 있습니다.

5. Correct Answer

✅ Correct Answer: d) 3

📘 Explanation (EN/KR)

  • Some transitions cannot occur in the same test path.
  • Therefore, fewer than 3 test cases cannot cover all transitions.
  • Three test cases are enough to include all valid transitions at least once.

특정 전이가 함께 발생할 수 없으므로 3개보다 적은 테스트 케이스로는 모든 전이를 커버할 수 없습니다. 따라서 정답은 d) 3입니다.

6. Final Summary

  • State Transition Testing focuses on states & transitions.
  • Transition coverage requires each transition at least once.
  • Due to structural constraints, minimum **3** tests are needed.

상태 전이 테스트는 “전이”를 최소 한 번씩 테스트하는 것이 핵심이며, 이 문제에서는 구조적 제한 때문에 최소 3개가 필요합니다. FL-4.2.4


1. What is State Transition Testing?

State Transition Testing is a black-box test technique used for systems where the output depends on the current state and the events that cause transitions between states.

상태 전이 테스트(State Transition Testing)는 시스템이 현재 상태(state)입력 이벤트(event)에 따라 다른 동작을 보이는 경우 활용하는 블랙박스 기법입니다.

2. When Should You Use It?

  • Systems with modes or states
  • Systems where actions depend on previous inputs
  • Workflow-based systems
  • Login/session logic
  • Device controllers (e.g., machine ON → RUN → PAUSE → OFF)

상태가 존재하는 시스템, 이전 입력에 따라 동작이 달라지는 시스템에서 효과적입니다.

3. Key Components

Component Description 한국어 설명
States System conditions/modes 시스템의 상태(모드)
Events Inputs/actions that trigger transitions 상태 전이를 일으키는 이벤트
Transitions Movement from one state to another 한 상태에서 다른 상태로 이동
Valid Transitions Allowed transitions 가능한 전이
Invalid Transitions Forbidden/impossible transitions 불가능한 전이

4. Types of State Transition Coverage

✔ 1) State Coverage

Each state is visited at least once.

모든 상태를 적어도 한 번씩 방문

✔ 2) Transition Coverage (ISTQB 기본 출제)

Each valid transition is exercised at least once.

모든 유효 전이를 한 번씩 테스트

✔ 3) Transition-Pair Coverage

Each possible sequence of two consecutive transitions is executed.

2단 전이(전이 조합)까지 테스트

✔ 4) N-Switch Coverage

N consecutive transitions must be covered.

연속 전이 N단계를 커버하는 고급 기법

5. Example Mini State Machine

Current State Event Next State
Locked Enter correct PIN Unlocked
Locked Enter wrong PIN Locked (error count++)
Unlocked Timeout Locked

예: ATM PIN 입력 → 상태에 따라 다음 상태가 달라지는 대표적인 사례

6. Valid vs Invalid Transitions

  • Valid: correct PIN → Unlocked
  • Invalid: Unlocked → "wrong PIN" (논리적으로 불가능)

유효/무효 전이를 구분하는 것은 시험에서 중요한 포인트입니다.

7. ISTQB Exam Strategy

✔ 1) Count transitions → match to minimal test cases

전이 수를 세고, 하나의 테스트에서 가능한 전이를 그룹화

✔ 2) Some transitions cannot be combined

Because some transitions require different paths or states.

특정 전이는 동일한 테스트 케이스에서 동시에 발생할 수 없음(Exam A Q23 유형)

✔ 3) Minimal test suite requires grouping transitions efficiently

✔ 4) Pay attention to RESET / DONE states

종료·초기화 상태가 있는 경우 하나의 테스트로 결합 불가

8. Common Exam Mistakes

  • Confusing states with transitions
  • Assuming invalid transitions are possible
  • Forgetting that some transitions are mutually exclusive
  • Trying to put “end state” transitions into a single test

가장 흔한 실수는 하나의 테스트에 모든 전이를 포함하려고 하는 것.

9. Quick Summary

  • State Transition Testing = test behavior across states
  • Used for: workflows, devices, UIs, login/session
  • Coverage = state, transition, transition-pair, N-switch
  • Goal in ISTQB foundation: valid transitions coverage
  • Minimal tests often needed because transitions cannot be combined

상태 기반 시스템을 테스트하는 매우 강력한 기법이며, ISTQB 시험에서는 주로 “전이 커버리지”를 묻습니다.


Related: More ISTQB Posts

다음 이전