David Khourshid and José Valim discuss model-based testing over formal verification
Prominent developer David Khourshid (DavidKPiano) and Elixir creator José Valim held a focused discussion on Model-Based Testing (MBT), with a core takeaway: compared to formal verification, MBT is far more approachable for everyday developers.
Confirmed
- David Khourshid noted that while formal verification is cool, he'd rather see developers discover MBT; he then published an article introducing the concept, paired with a new Stately tutorial. He explained the difference: formal verification proves logic matches a specification, while MBT uses state machines to generate tests, making it far more practical.
- Khourshid shared hands-on experience: converting a batch of existing E2E tests to MBT by building models from the tests' transition sequences. The result was faster runs, with a single walk covering a whole set of E2E cases.
- In his methodology discussion with José Valim, Khourshid also broke down the difference between PBT and MBT: PBT is essentially "seeded random generation," whereas MBT has deliberate coverage criteria.
- José Valim proposed an alternative: capture state transitions while a regular test suite runs, then report all uncovered transitions afterward. His reasoning is that existing tests are typically more complex than executing a single transition, making this more of a coverage technique.
Why it matters
- The discussion laid out a concrete path for migrating from traditional E2E tests to model-based testing, backed by measured results—directly useful for test engineering practice.
- Valim's "uncovered transition report" idea turns MBT thinking into an incrementally adoptable coverage tool, lowering the barrier for teams.
2026-11-24 ~ 2026-11-24 · 5 related posts
Primary sources
- David Khourshid: devs should embrace model-based testing, not just formal verification — DavidKPiano · 2026-11-24
- [source] DavidKPiano makes the case for model-based testing: generate tests from state machines — DavidKPiano · 2026-11-24
- [source] Jose Valim proposes capturing uncovered transitions from regular test suites — josevalim · 2026-11-24
- [source] Converting E2E tests to model-based tests: faster runs, more bugs found — DavidKPiano · 2026-11-24
- DavidKPiano: model-based tests replaced E2E suites with faster runs and more bugs found — DavidKPiano · 2026-11-24