Abstract

Automated test case generation based on path coverage (ATCG-PC) is a black-box optimization problem whose difficulty is attributed to the one-to-many relationship between path and test cases. It results in a large number of redundant function evaluations in the search process of algorithms for ATCG-PC. To minimize the redundant function evaluations for solving ATCG-PC, the equivalent mapping subspaces are defined to decompose the search space according to the paths. Inspired by the data distribution hypothesis, we assume that the target path can be covered by searching in one neighborhood of a test case (equivalent mapping subspace) instead of the whole search space. This paper presents a manifold-inspired search-based algorithm that finds the equivalent mapping subspaces with the test-case-path relationship matrix. Furthermore, the algorithm generates test cases covering all possible paths by searching in the found subspaces. The experimental results show the proposed algorithm has significantly lower function evaluation consumption than the state-of-the-art algorithms with the highest path coverage rate in two open-source toolkits and 16 open-source real-world programs. Several orders of magnitude of function evaluations can be saved by searching in the found equivalent mapping subspaces instead of exploring the whole search space.

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.