Abstract

DynaMOSA is an effective search-based test case generation algorithm. However, it uses an alternating variable method for local search. This method follows a greedy strategy that considers each input variable of an optimization function independently and attempts to optimize it. Some problems with this kind of search are that it can easily become stuck in the local optimal solution and its search capability becomes inadequate in the late stage of the search. Such constraints may lead to a dramatic drop in search performance. To solve these problems, this study proposed a local search algorithm based on adaptive simulated annealing and symbolic path constraints to generate test cases with high coverage for multiple testing criteria within a limited time budget. On the one hand, the simulated annealing algorithm was selected to explore the neighborhood of candidate solutions during the search. On the other hand, various simulated annealing operators were designed for the search of each statement to enhance the applicability of the algorithm in various programs. Additionally, symbolic execution was introduced as a supplement to the simulated annealing algorithm for local search to generate test cases for inputs with complex structures. Furthermore, the proposed algorithm was implemented in EvoSuite framework. From an SF110 open-source benchmarking dataset, 49 projects or 110 classes were selected according to the complexity and number of objectives of each class under test to conduct the experiments. The proposed algorithm outperformed the original algorithm in generating high coverage test cases on most projects in terms of line, mutation, and multicriteria coverage as well as search efficiency.

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.