Test Case Determination
This article is a term explanation for test case determination – including exam questions and tags.
In a Nutshell
- Equivalence classes: groups inputs that behave the same way
- Boundary value analysis: tests exactly at the boundaries (min, max, min±1, max±1)
- Branch/path coverage: ensures that every code path is executed
Compact Technical Description
Equivalence Classes
Divides input ranges into classes for which the system responds identically. One test case per class.
Boundary Value Analysis
Tests exactly at the boundaries and immediately next to them – errors often occur at boundaries.
Branch Coverage
Every branch (if/else) must be executed at least once with True and False.
Path Coverage
Every possible combination of branches is tested (time-consuming).
Statement Coverage
Every line of code must be executed at least once.
Exam-Relevant Key Points
- Equivalence classes: form valid/invalid classes
- Boundary value analysis: test min, max, min-1, max+1
- Branch coverage: cover all if/else paths
- Path coverage: execute all paths (theoretically)
- Statement coverage: execute every line
- Whitebox: knowledge of internal structure
- Blackbox: access only through interfaces
Core Components
- Equivalence class formation
- Boundary value analysis
- Branch coverage
- Path coverage
- Statement coverage
- Test case catalog
- Coverage analysis
- Tools (coverage tools)
- Risk-based prioritization
- Documentation
Practical Example (Age Validation)
// Rule: Age must be between 18 and 65
// Equivalence classes:
// - valid: [18, 65]
// - invalid: <18, >65
// Boundary value analysis:
// 17, 18, 19 (lower boundary)
// 64, 65, 66 (upper boundary)
// Test cases:
// - 17 (invalid)
// - 18 (valid, boundary)
// - 19 (valid)
// - 64 (valid)
// - 65 (valid, boundary)
// - 66 (invalid)
Typical Exam Questions (with Short Answers)
- What is an equivalence class? A group of inputs with the same expected behavior.
- Why boundary value analysis? Errors often occur at boundaries.
- Branch coverage vs. statement coverage? Branch: all if/else paths; statement: every line.
- Path coverage? Test all possible path combinations (very time-consuming).
Most Important Sources
- https://www.istqb.org
- https://junit.org/junit5/docs/current/user-guide/
- https://testing.googleblog.com