State Machine Tester
Describe a finite state model with states, events, an initial state and transitions. The tool checks structural reachability, missing state-event pairs and branches needing an explicit guard choice. It generates a shortest path from the initial state to each reachable transition, so you can use the resulting event sequences as test ideas. Guards are labels, not executable conditions.
Key features
- Validate state/event names, references, duplicate branches and size bounds
- Compute reachable and unreachable states and transition indexes
- List missing state-event pairs and event branches requiring guard choice
- Generate one shortest structural test sequence per reachable transition, with expected state trace
- Run an explicit event-and-guard sequence against the model and download JSON reports
How to use
- Load the example or paste a JSON model with states, events, initial and transitions.
- Analyze structural reachability and review missing or ambiguous state-event pairs.
- Inspect generated test sequences and the expected state trace for each transition.
- Paste a JSON event sequence and run it against the model with explicit guard labels.
- Download the analysis and test cases after reviewing them.
Use cases
- Draft transition coverage cases for a form or workflow
- Spot an unreachable state in a declared UI flow
- Review missing event handling and ambiguous guarded branches before implementation
Frequently asked questions
Do guards execute as code?
No. A guard is an opaque name. Reachability and generated paths assume a matching guard can be satisfied; they do not prove runtime feasibility. Simulation requires the exact guard label when needed.
What does transition coverage mean here?
The generator emits one structural shortest path from the initial state to the source of each reachable transition, then appends that transition. It does not minimize the whole test suite or execute your application.
What counts as a missing transition?
Every declared state-event pair with no transition is listed, including unreachable states. That is a completeness observation, not necessarily a defect for an intentionally partial machine.
How are ambiguous branches handled?
Several transitions with the same state and event but different guard labels are reported. A manual simulation must specify a guard label for that event. The tool does not decide whether real guard conditions overlap.
Can a model contain cycles?
Yes. Cycles and self-transitions are valid. Breadth-first search records the shortest structural route to each reachable state and avoids infinite traversal.
What input and size limits apply?
Use JSON states/events arrays, an initial state, and transitions with from, event, optional guard and to. Names are short identifiers. The model is limited to 128 KiB, 40 states, 20 events and 400 transitions; manual sequences are limited to 200 steps.
Privacy
The model and sequence remain in browser memory; no application is contacted. Downloaded JSON contains your state and event names. Review files before sharing.
Comments & questions