Test Design Techniques
Derive effective test cases systematically using equivalence partitioning, boundary analysis, decision tables, state models, property-based testing, and exploratory testing.
Introduction
If exhaustive testing is impossible, the question is which tests to write. Experienced testers do not pick inputs at random or only try “typical” cases. They use techniques that systematically cover the ways software tends to fail.
These techniques also make AI far more useful. Instead of asking an assistant for “some tests”, you can ask it to apply a named technique to a specific requirement, and then check the result against the technique.
Learning Objectives
- Apply equivalence partitioning and boundary value analysis.
- Use decision tables for combinations of conditions.
- Model behavior with state transitions.
- Write property-based tests for invariants.
- Plan and run exploratory testing sessions.
- Use AI to apply techniques and verify its output.
1. Equivalence Partitioning
Divide the input space into groups (partitions) that the software should treat the same way. Test one representative from each partition.
Example: the body field of a feedback row (illustrative rule: 1 to 10,000 characters after trimming).
| Partition | Valid? | Representative |
|---|---|---|
| Empty string | No | "" |
| Whitespace only | No | " " |
| 1 to 10,000 characters | Yes | "Search is slow" |
| More than 10,000 characters | No | 10,001 characters |
| Non-text (missing column) | No | row without body |
Test invalid partitions separately, so that one failure cannot hide another.
2. Boundary Value Analysis
Defects cluster at the edges of partitions: off-by-one errors, < versus <=, empty versus single item.
For the body length rule, test at 0, 1, 2, 9,999, 10,000, and 10,001 characters. For the file size limit, test just below, exactly at, and just above the limit. For dates, test the first and last valid day, leap days, and the transition across year boundaries.
Also consider unusual but valid values: Unicode text, emoji, right-to-left scripts, very long single words, leading and trailing spaces, and quotes or delimiters inside quoted CSV fields.
3. Decision Tables
When behavior depends on a combination of conditions, enumerate the combinations.
Example: import result for a row.
| Body valid | Date valid | Already imported | Outcome |
|---|---|---|---|
| Yes | Yes | No | Imported |
| Yes | Yes | Yes | Skipped as duplicate |
| No | Yes | n/a | Rejected: MISSING_BODY |
| Yes | No | n/a | Rejected: INVALID_DATE |
| No | No | n/a | Rejected with both reasons (or the first; decide and document) |
The table exposes a requirement gap immediately: what should happen when both body and date are invalid? A technique that reveals ambiguous requirements before a line of test code is written has paid for itself.
4. State Transition Testing
For behavior that depends on history, model states and transitions. The import job:
1
2
3
queued --> running --> succeeded
| \--> failed (retries exhausted)
\-----> retrying --> running
Derive tests for:
- Each valid transition.
- Invalid transitions (a succeeded job being restarted; a failed job marked succeeded).
- Sequences, such as retry then success, and failure after partial progress.
- Concurrent events: cancellation arriving while the job runs.
5. Property-Based Testing
Instead of choosing examples, state a property that must hold for all inputs and let a tool generate many cases, including ones you would not think of.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from hypothesis import given, strategies as st
@given(st.text())
def test_validation_never_crashes(body):
result = validate_row({"body": body, "source": "email", "date": "2026-11-02"})
assert result.ok in (True, False) # always returns a result
@given(st.text(min_size=1, max_size=10_000).filter(lambda s: s.strip()))
def test_valid_bodies_are_accepted(body):
assert validate_row({"body": body, "source": "email", "date": "2026-11-02"}).ok
@given(st.lists(valid_rows()))
def test_importing_twice_equals_importing_once(rows):
once = import_rows(WS_A, rows)
twice = import_rows(WS_A, rows)
assert count_items(WS_A) == once.imported # idempotency property
Useful property types: “never crashes,” round-trips (parse(format(x)) == x), idempotency, ordering invariants, “output is a subset or permutation of input,” and comparison with a simple reference implementation. When a property fails, the tool shrinks the input to a minimal counterexample, which makes debugging easy.
6. Error Guessing and Exploratory Testing
Techniques do not replace experience. Error guessing draws on knowledge of how software typically fails: null and empty values, concurrency, time zones, character encodings, large inputs, network failures, permissions.
Exploratory testing is simultaneous learning, test design, and execution. It finds problems scripts miss, especially usability problems and unexpected interactions. Make it disciplined by using session-based charters:
1
2
3
4
Charter: Explore the import flow with malformed and unusual files
to discover how errors are reported to the user.
Time-box: 60 minutes
Notes: files tried, behaviors observed, questions, bugs found
Debrief afterwards. Turn valuable discoveries into automated tests.
7. Using AI to Apply Techniques
Name the technique and the requirement. Ask for the derivation, not just the cases.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Act as an experienced test analyst.
Requirement: [paste, with acceptance criteria and rules]
Apply, in turn:
1. Equivalence partitioning: list the partitions per input.
2. Boundary value analysis: list boundary values for each numeric
or length limit.
3. A decision table for the combinations of conditions.
4. A state model, if behavior depends on history.
5. Candidate properties for property-based tests.
For each test case, give: ID, purpose, input, expected result, and the
partition or rule it covers. Flag any case where the expected result
is not defined by the requirement and needs a decision. Do not invent
expected results.
Then review:
- Is the expected result derived from the requirement, or guessed?
- Are the partitions and boundaries correct for your actual rules?
- What was missed: concurrency, encoding, permission, and integration aspects often are.
- Are there redundant cases testing the same partition?
8. Practical Exercise
For SignalDesk (or your project):
- Choose a requirement with rules (for example, row validation, or the job lifecycle).
- Derive test cases manually using at least three techniques.
- Run the AI prompt on the same requirement, and compare. Record cases only you found, cases only the AI found, and incorrect expectations the AI proposed.
- Write at least two property-based tests, including idempotency of import.
- Run a 45-minute exploratory session on the import flow with a written charter, and record at least three observations or questions.
- Record all requirement ambiguities discovered and send them to the product owner.
Verification
You are ready to continue when:
- Each test case traces to a requirement and a technique.
- Boundaries have tests on both sides.
- Cases with undefined expected results are flagged as questions.
- At least one property-based test exists and has found, or demonstrably could find, a defect.
- An exploratory session produced written notes.
Key Takeaways
- Techniques turn “which tests?” into a systematic derivation.
- Defects cluster at boundaries, in combinations, and in state transitions.
- Property-based tests explore inputs you would not think to try.
- Exploratory testing finds what scripts miss; capture discoveries as automated tests.
- Ask AI to apply a named technique, and verify its expected results.
What’s Next?
With techniques in hand, we decide where to apply them. Next, we build a test strategy that allocates effort by risk across levels, types, and ownership.