ON AUTOMATICALLY CONVERTING PROGRAM INVARIANT TO ASSERTION AND ITS APPLICATION

Deng Chaoqiang,Zeng Fanping,Wu Fei,Xiong Neng,Dong Qixing
DOI: https://doi.org/10.3969/j.issn.1000-386x.2012.11.045
2012-01-01
Abstract:Program invariants,which can reveal internal properties and dynamic execution situations of the program,have been successfully applied to generation and reduction of software test case.However,the program invariants have to be re-extracted from entire test suite for every new test case added,this causes a heavy time cost.This paper proposes a novel method to automatically convert program invariants into corresponding assertions,which is based on regular expression.Assertions are used to judge whether a new test case is the redundancy,this saves a great deal of time since the program invariants are re-extracted only when the new test case is not the redundant one.Applying this assertion-based testing method to regression test,the test suite can be effectively reduced,and the elements affected by the program modification can be identified,thus the latent program errors can be further found as well.Experiment results show that compared with other test case selection techniques,the method proposed in the paper costs less time and has a higher test suite reduction rate and stronger errors exposing ability.
What problem does this paper attempt to address?