Skip to main content

Model-Based Testing

Model-based testing generates test cases automatically from a formal model of the system's expected behavior — a state diagram, a flowchart, or a specification — rather than having a human write each test case by hand. Changing the model regenerates the tests, keeping them in sync with the intended behavior.

The model captures the system's expected states and transitions abstractly — for example, an order can move from Placed to Shipped to Delivered, but never directly from Placed to Delivered. A model-based testing tool walks that model and generates test cases covering the paths and transitions it defines, often far more systematically than a human would think to by hand.

It's most valuable for systems with complex, well-defined state logic — workflow engines, protocol implementations, telecom systems — where the combinatorics of possible states and transitions are too large to cover by manually writing individual test cases.

Model-Based Testing — Definition, Example & How It's Used | QA Bash Glossary | QA Bash