Abstract

Automated test generation for object-oriented programs is an essential and yet a difficult task. Many automated test generation approaches produce test cases entirely from the program under test, without considering useful information from already created test cases. This paper presents an approach to regenerate test cases via exploiting frequently-used method call sequences from test repository. Particularly, for an object-oriented program under test, a sequential pattern mining strategy is employed to obtain frequent subsequences of method invocations as sequential patterns from corresponding test repository, and then a GA-based test case regeneration strategy is used to produce new test cases on the basis of the sequential patterns. A prototype called SPM-RGN is developed and is applied to generate test cases for actual Java programs. Empirical results show that SPM-RGN can achieve 47.5%, 11.2% and 4.5% higher branch coverage than three existing automated test generators. Besides, SPM-RGN produces 85.1%, 28.1% and 27.4% shorter test cases than those test generators. Therefore, the test cases generated by SPM-RGN are more effective and easier to understand.

Full Text
Paper version not known

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

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.