What is Model-Based Testing

Definition

Model-based testing is an approach that generates test cases automatically from a model describing the expected behaviour of the system, such as a state machine, so that tests are derived systematically from the specification rather than written by hand one at a time.
« Back to Glossary Index
  • Generates many test cases automatically from a behaviour model
  • Improves coverage by systematically exploring modelled states and transitions
  • Keeps tests in sync with the spec by regenerating them when the model changes
  • Reduces manual effort of writing and maintaining individual test cases

Real World Example

A team models the states of an order workflow as a state machine and uses model-based testing to auto-generate paths through every valid and invalid transition, uncovering an unhandled cancel-after-shipment case humans had missed.

FAQs

What is the model in model-based testing?

It is a formal description of expected behaviour, often a state machine or flow diagram, from which test cases are derived.

What is the main benefit?

Systematic, automatic generation of test cases that can achieve broader, more consistent coverage than hand-written tests.

When is model-based testing most useful?

For systems with complex, well-defined behaviour and many states or transitions, where manual test design is error-prone.

Hello popup window