What are black-box test design techniques?
Black-box techniques derive test cases from the specification without reading the code: equivalence partitioning groups inputs that should behave the same, boundary value analysis tests the edges of each group (0, 1, max, max+1), decision tables enumerate combinations of conditions, state transition testing walks the allowed and forbidden state changes, and pairwise testing covers every pair of parameter values with far fewer cases than the full product.
Read the guide: How to Write Test Cases
How to use State Transition Generator
- Write one transition per line; the first state is the initial state.
- Choose 0-switch or 1-switch coverage and whether to include invalid-transition tests.
- Generate to get the state table, Mermaid diagram and test cases.
State Transition Generator features
- Transitions as "State --event--> State" with optional guards
- State × event table showing valid targets and invalid combinations
- 0-switch and 1-switch coverage test cases
- Negative tests for every invalid transition
- Unreachable-state and missing-final-state warnings
- Mermaid stateDiagram-v2 text for documentation
State Transition Generator example
Order workflow
Input:
New --pay--> Paid
Paid --ship--> Shipped
Shipped --deliver--> Delivered
New --cancel--> CancelledOutput:
ST-001 New —pay→ Paid positive
ST-005 New —pay→ Paid —ship→ Shipped positive (1-switch)
ST-007 Invalid: "ship" while in New negative
stateDiagram-v2
[*] --> New
New --> Paid: pay
Paid --> Shipped: ship0-switch coverage tests each arrow once, and 1-switch tests each pair of consecutive arrows.| # | From | To | Event · 0-switch test |
|---|---|---|---|
| 1 | NewStart | Paid | pay · ST-001 |
| 2 | Paid | Shipped | ship · ST-002 |
| 3 | Shipped | DeliveredEnd | deliver · ST-003 |
| 4 | NewStart | CancelledEnd | cancel · ST-004 |
With the tool's defaults, 1-switch adds ST-005 New → Paid → Shipped and ST-006 Paid → Shipped → Delivered; the 16 state × event combinations with no arrow are invalid-transition tests, from ST-007.
Frequently asked questions about State Transition Generator
How do I write transitions?
One per line as "State --event--> State". Guards go in brackets ("Delivered --return [within 14 days]--> Returned"). The first state mentioned is the initial state.
What is 0-switch and 1-switch coverage?
0-switch tests every single transition. 1-switch tests every valid pair of consecutive transitions, which finds bugs that only show up after a particular sequence.
What are invalid-transition tests?
For every state × event combination without a defined transition, a negative test checks the event is rejected and the state does not change — the most common source of workflow bugs.
What can I do with the Mermaid diagram?
Paste it into GitHub, GitLab, Notion, Obsidian or mermaid.live to render the state diagram for reviews and documentation.
References
- ISTQB Certified Tester Foundation Level (CTFL) v4.0The foundation syllabus of software testing: test levels and types, test design techniques, test management and tools.
- ISTQB GlossaryThe standard definitions of testing terms — test case, regression testing, severity, priority, boundary value analysis and the rest.
- ISO/IEC/IEEE 29119-1:2022 — Software and systems engineering — Software testing — Part 1: General conceptsThe international software-testing standard: concepts, processes, documentation and techniques.