Abstract:
Simulated Annealing (SA) and Genetic Algorithms (GA) have been
proposed for generating integer-value test cases for path coverage. In this
work, we suggest significant improvements to these algorithms and present
empirical results that show their capabilities. The improvements cover
algorithmic and implementation issues. They also add the capability of
generating real-value subject programs for path coverage. We empirically
compare the SA and GA algorithms with a hill-climbing algorithm, Korel's
algorithm, for integer-value subject programs and compare SA and GA with
each other on real-value subject programs. Our empirical work uses eight
subject programs and a total of 49 paths. The results show that: (a) SA and
GA are superior to Korel's algorithm in the number of covered paths, (b) SA
tends to perform slightly better than GA in terms of the number of covered
paths, and (c) GA is faster than SA; however, Korel, when it succeeds in
finding the solution, is the fastest.