Abstract

We present a new method for model-based mutation-driven test case generation. Mutants are generated by making small syntactical modifications to the model or source code of the system under test. A test case kills a mutant if the behavior of the mutant deviates from the original system when running the test. In this work, we use hyperproperties—which allow to express relations between multiple executions—to formalize different notions of killing for both deterministic as well as non-deterministic models. The resulting hyperproperties are universal in the sense that they apply to arbitrary reactive models and mutants. Moreover, an off-the-shelf model checking tool for hyperproperties can be used to generate test cases. Furthermore, we propose solutions to overcome the limitations of current model checking tools via a model transformation and a bounded SMT encoding. We evaluate our approach on a number of models expressed in two different modeling languages by generating tests using a state-of-the-art mutation testing tool.

Highlights

  • The ever rising complexity of systems demands automated methods for creating high quality test suites

  • We present a novel application for that field and a powerful test case generation method that can be readily applied, as we demonstrate in our experimental evaluation on two different modeling formalisms using off-the-shelf tools

  • To show potential killability of a non-deterministic mutant for a deterministic model, one needs to find a trace of the model (∃π ) such that there is a trace of the mutant with the same inputs (∃π ) that eventually diverges in outputs, which is exactly formalized by the hyperproperty φ1 above

Read more

Summary

Introduction

The ever rising complexity of systems demands automated methods for creating high quality test suites. We present such a method by solving mutation-based test generation via hyperproperty model checking. The idea is that tests are counter-examples to encodings of coverage criteria Even though this success was partially carried over to mutationbased test generation [36,50], strong mutation analysis does not quite fit into the framework of classical model checking. – An experimental evaluation of mutation-based test case generation via HyperLTL model checking, using multiple modeling formalisms and leveraging an off-the-shelf toolchain. 4, we provide the HyperLTL encodings of both types of killing and multiple settings in terms of presence or absence of non-determinism, as well as a HyperCTL* encoding of tests with inconclusive output information.

System model
HyperLTL
HyperCTL*
Killing mutants
Mutants
Killing
Killing with hyperproperties
Deterministic model and mutant
Non-deterministic model and mutant
Mixed determinism model and mutant
Locally adaptive tests
Non-deterministic models in practice
Controlling non-determinism in modeling languages
Encoding bounded killability into SMT
Experiments
Toolchain
Deterministic case
Non-deterministic case
Test suite evaluation
Quantitative experiments
Hyperproperties
Model checking-based test generation
Symbolic test generation
Semantics of mutation coverage
Findings
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call