Structural Test Data Generation Based on Harmony Search
Software testing has been validated as an effective way to improve software quality. Among all research topics in software testing, automated test data generation has been viewed as one of the most challenging problems. In recent years, a typical solution is to adopt some meta-heuristic search techniques to automatically tackle this task. In the paper, our main work is to adapt an emerging meta-heuristic search algorithm, i.e. harmony search (HS), to generate test data satisfying branch coverage. Fitness function, also known as the optimization objective, is constructed via the branch distance. In order to verify the effectiveness of our method, eight well-known programs are utilized for experimental evaluation. According to the experimental results, we found that test data produced by HS could achieve higher coverage and shorter search time than two other classic search algorithms (i.e. SA and GA).
KeywordsTest data generation harmony search fitness function branch coverage experimental evaluation
Unable to display preview. Download preview PDF.
- 1.McMinn, P.: Search-Based Software Testing: Past, Present and Future. In: Proc. of the 4th International Workshop on Search-Based Software Testing (SBST 2011), in conjunction with the 4th IEEE International Conference on Software Testing (ICST 2011), pp. 153–163. IEEE Press, New York (2011)Google Scholar
- 2.Tracey, N., Clark, J., Mander, K., McDermid, J.: An Automated Framework for Structural Test-Data Generation. In: Proc. of the 13th International Conference on Automated Software Engineering (ASE 1998), pp. 285–288. IEEE Press, New York (1998)Google Scholar
- 3.Ayari, K., Bouktif, S., Antoniol, G.: Automatic Mutation Test Input Data Generation via Ant Colony. In: Proc. of the 9th Annual Conference on Genetic and Evolutionary Computation (GECCO 2007), pp. 1074–1081. ACM Press (2007)Google Scholar