Model-based testing skill: state machines let agents cover every path in one walk

DavidKPiano · x · 2026-12-01

DavidKPiano added a model-based testing skill to Stately Skills: agents model app flows as state machines and Playwright tests every path. The attached charts show 3 hand-written E2E tests needing 12 steps to cover only 5/12 transitions (6/7 states), while one 15-step generated walk covers all 12 transitions and 7 states. MBT wins when event order matters; unit tests still fit isolated rules. XState v5 uses xstate/graph, v6 beta uses @xstate/test@beta, with a copy-paste prompt for coding agents.

Related event: DavidKPiano Adds Model-Based Testing Skill to Stately Skills(2 posts)→

Original post →

More from coding & agent

coding & agent channel →