# Test case design: use equivalence classes and boundary values A test case should provide a clear, repeatable check of a condition or behavior. - Canonical: https://satracking.net/guides/software-test-case-design-boundary-equivalence/ - Language: en - Category: validation - Level: intermediate - Published: 2026-11-14 - Updated: 2026-11-14 --- ## Why design test cases systematically A test case should provide a clear, repeatable check of a condition or behavior. The supplied testing references cover black-box techniques that reduce a large input space into representative checks. The goal is not to test every possible value, but to select cases that are likely to reveal meaningful defects. ## 1. Start from a requirement or rule Identify the behavior to verify, the inputs that influence it, the expected output and any relevant state or permission. If the requirement is ambiguous, resolve it before deriving expected results. Example: a form accepts an age from 18 through 65 inclusive. The allowed range and the treatment of values outside it must be explicit. ## 2. Partition inputs into equivalence classes An equivalence class is a group of inputs expected to be handled in the same way. For the age rule, candidate classes are: - below 18: invalid; - 18 through 65: valid; - above 65: invalid; - missing or non-numeric input: separate invalid classes if the interface treats them differently. Choose representative values from each class. One representative does not prove every value is correct, but it gives a structured starting point. ## 3. Add boundary-value checks Defects often occur at the edges of ranges. For the example, test 17, 18, 19, 64, 65 and 66. These values examine just outside, at and just inside the boundaries. For date ranges, amounts, character limits and pagination, identify both lower and upper boundaries. Check whether the requirement uses inclusive or exclusive limits. ## 4. Combine conditions carefully When multiple fields or rules interact, avoid blindly multiplying every combination. Identify combinations with distinct business outcomes or high risk. Decision tables can help when combinations of conditions determine different actions. Keep each test case focused enough that a failure points toward a specific rule. ## 5. Write reproducible test cases Include: - identifier and objective; - preconditions and test data; - steps; - expected result; - environment or version where relevant; - actual result and status during execution. Use clear expected results. “Works correctly” is not an observable assertion; “the form rejects 17 and displays the agreed validation message” is. ## 6. Review gaps and overlaps Map test cases to requirements and partitions. Look for untested classes, missing boundaries, duplicated checks and assumptions about data. Include negative cases and permission boundaries when relevant. ## Common mistakes - Testing only typical values. - Forgetting values exactly at the boundary. - Treating blank input as equivalent to zero. - Using expected results that are not defined by the requirement. - Creating huge combinations without considering risk. - Failing to record the data needed to reproduce the test. ## Source basis Based on the supplied software-testing teaching materials, especially the black-box testing and test-design sections in *Software Testing and Quality Assurance* and *Software Testing Tutorial*. The examples here are illustrative applications of those techniques, not values prescribed by the sources. ## Official references - Software Testing and Quality Assurance (supplied source-library material) — https://www.istqb.org/ (verified 2026-11-14)