Using model checking to generate tests from specifications
Paul Ammann, P.E. Black, William J. Majurski · 2002
We apply a model checker to the problem of test generation using a new application of mutation analysis. We define syntactic operators, each of which produces a slight variation on a given model. The operators define a form of mutation analysis at the level of the model checker specification. A model checker generates countersamples which distinguish the variations from the original specification. The countersamples can easily be turned into complete test cases, that is, with inputs and expected results. We define two classes of operators: those that produce test cases from which a correct implementation must differ, and those that produce test cases with which it must agree. There are substantial advantages to combining a model checker with mutation analysis. First, test case generation is automatic; each countersample is a complete test case. Second, in sharp contrast to program-based mutation analysis, equivalent mutant identification is also automatic. We apply our method to an example specification and evaluate the resulting test sets with coverage metrics on a Java implementation.
Cited by 320 works. doi:10.1109/icfem.1998.730569
Authors
References
- Personal Communication
- Symbolic model checking: 1020 States and beyond
- The model checker SPIN
- Hints on Test Data Selection: Help for the Practicing Programmer
- Specifying Software Requirements for Complex Systems: New Techniques and Their Application
- Software unit test coverage and adequacy
- Constraint-based automatic test data generation
- Automated consistency checking of requirements specifications
- Data Abstraction, Implementation, Specification, and Testing
- Model checking large software specifications