Using model checking to generate test cases for class testing

Chenliang Liang,Changhai Nie,Baowen Xu,Zhenyu Chen
DOI: https://doi.org/10.3321/j.issn:1001-0505.2007.05.008
2007-01-01
Abstract:A novel approach is presented to generate test cases for class testing. The states and the behaviors of the object are extracted from the source code. Then the class under testing is characterized abstractly with a 4-tuple, which can be converted into an equivalent Kripke model. The coverage criteria are expressed by computer tree logic (CTL) formulae. Model checker generates witnesses automatically when verifying CTL formulae on that Kripke model. The witnesses can be converted into a test suite which satisfies the corresponding coverage criteria. Test cases are generated from source code directly, and the greedy method is used to reduce redundant test cases in order to save the cost of software testing. The experimental results show that test cases generated by the proposed approach can achieve high rate of coverage.
What problem does this paper attempt to address?