Abstract

Search Based Software Testing (SBST) uses meta-heuristic optimizing algorithms to automate a testing task, for example the automatic generation of test data. The goal of SBST is to satisfy various test adequacy criteria. Among the different types of coverage criteria, branch coverage is the most used criterion in software testing. The fitness function is one of the most important parts in SBST. However, most of the researches for SBST focus on changing the search algorithms instead of improving fitness functions on which all heuristic search relies. This paper proposes a dynamic fitness function for branch coverage. Concretely, we evaluate the hardness of covering each essential branch, based on which an approximation algorithm is designed to evaluate the distance of a test candidate to the target branch. As the branch hardness varies with the search iteration, the heuristic information is obtained dynamically. Thus, this fitness function is richer and more informed than the traditional counterparts. Finally, the empirical study reveals the promising results of our proposal. Especially for the branches that are difficult to be covered, the fitness function proposed in this paper outperforms its counterparts significantly.

Full Text
Published version (Free)

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