State Machine Tester

State Machine Tester

Local symbolic model analysis · no application code or guard expression runs.

1. Define a state machine

JSON keys: states, events, initial, transitions. Each transition has from, event, optional guard label and to.

Paste a JSON model or load the example.

Comments & questions

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

  1. Load the example or paste a JSON model with states, events, initial and transitions.
  2. Analyze structural reachability and review missing or ambiguous state-event pairs.
  3. Inspect generated test sequences and the expected state trace for each transition.
  4. Paste a JSON event sequence and run it against the model with explicit guard labels.
  5. 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.

Related Tools

Decision Tree LabData Expectation RunnerMock Data GeneratorWasm Module InspectorHreflang Matrix CheckerAST Query PlaygroundContainer Build GraphDependency Graph ExplorerSemver Range LabCron Schedule AuditorPatch Review WorkbenchSource Map ExplorerLocalization Catalog AuditorStructured Data ReviewerHTTP Archive AnalyzerWebhook Signature LabProtobuf Schema WorkbenchGraphQL Schema LabAvro Schema EvolutionLocal SQL WorkbenchSchema Form BuilderMesh Repair WorkbenchPipe Network LabRobot Arm Kinematics LabThermal Network LabBeam Response LabGear Train DesignerTolerance Stackup LabSensor Calibration FitPCB Stackup PlannerDigital Filter DesignerNetwork Reachability MapSun Shadow MapGPS Error SimulatorDigital Logic SimulatorAnalog Circuit LabMechanism Linkage LabAnalysis Mesh GeneratorOpenAPI Contract InspectorDatabase Migration PlannerDimensional Equation CheckerTruss Force LabBoolean Minimization LabControl Response LabQueueing Simulation LabGeofence Event SimulatorCoordinate Reference LabSurvey Traverse LabRaster Classification LabChoropleth Design LabMap Print ComposerRaster Reprojection LabElevation Contour MakerTerrain Viewshed LabWatershed DelineatorMap Tile PackagerText File Encoding WorkbenchFilesystem Portability AuditorSBOM License ExplorerFile Signature Auditornpm Lockfile Conflict ResolverSource Secret AuditorOffline Web Package BuilderCertificate Chain InspectorTorrent Metainfo InspectorChunked File PackagerEncrypted File VaultDuplicate File FinderArchive WorkbenchDesign Token ManagerSpacing Token DesignerResponsive Type SystemPackaging Dieline DesignerSVG Icon Sprite PackerFlex Layout PlaygroundCSS Grid PlaygroundRegex Equivalence LabMarkdown Repository AuditorLog Template MinerResponsive Layout AuditorEmail Template PreviewInternal Link GraphPetri Net SimulatorGit History VisualizerCurl Request WorkbenchBinary Protocol DesignerHex File EditorBinary Patch WorkbenchFile Signature WorkbenchAPI Mock SandboxSchema Column MapperEvent Log SessionizerER Diagram DesignerTime Series Gap AuditorStratified Data SplitterData Lineage DesignerData Anonymization WorkbenchJSON Schema ValidatorBasket Pattern AnalyzerRobots Policy TesterSEO HTML AuditorAccessibility Structure AuditorSyndication Feed WorkbenchIndexNow Payload BuilderCrawl Log AnalyzerCSP Policy WorkbenchSearch Performance AnalyzerCSV Formula Risk AuditorCORS Response SimulatorCache Header LabCookie Policy InspectorWeb Vitals Trace LabSitemap Health AuditorBatch File RenamerFile Manifest VerifierFolder Space MapFolder Difference ReviewerRoute Order OptimizerGeoJSON Map EditorPolygon Overlay LabCartographic Label PlacerSpatial Table JoinGeoJSON Topology AuditorGPX Track AnalyzerTrack Privacy RedactorCSV Table JoinCSV Pivot WorkbenchScientific Data ProfilerTabular Cleaning WorkbenchRecord ReconciliationData Dictionary BuilderCanonical Graph AuditorRedirect Plan TesterHTTP response and ping reference testBrowser and System InformationJSON ↔ YAML ConverterXML ↔ JSON ConverterHTML FormatterJavaScript Minifier.gitignore GeneratorLicense GeneratorUser-Agent ParserPassword Strength CheckerCode to ImageXML FormatterHTTP Status Code LookupMIME Type LookupJS & SQL String EscapeCSS Box Shadow GeneratorCSS Gradient GeneratorIndent ConverterNumber Base ConverterUnicode Escape ConverterUnicode InspectorJSON Structure DiffMarkdown Table GeneratorBase64 EncoderJSON FormatterURL EncoderSQL FormatterCron Expression GeneratorRegex TesterUUID GeneratorHash GeneratorTimestamp ConverterJWT DecoderHTML Entity ConverterMarkdown PreviewCSS MinifierMeta Tag GeneratorJSON ↔ CSVCase ConverterImage to Base64
Explore all Dev Tools tools →Image/Media →Text/Convert →Life/Fun →