Abstract
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).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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)
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)
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)
Pargas, R.P., Harrold, M.J., Peck, R.: Automated Structural Testing Using Genetic Algorithms. Software Testing, Verification and Reliability 9(4), 263–282 (1999)
Harman, M., McMinn, P.: A Theoretical and Empirical Study of Search-Based Testing: Local, Global, and Hybrid Search. IEEE Transactions on Software Engineering 36(2), 226–247 (2010)
Geem, Z.M., Kim, J., Loganathan, G.: A New Heuristic Optimization Algorithm: Harmony Search. Simulation 76(2), 60–68 (2001)
Geem, Z.M.: Music-Inspired Harmony Search Algorithm: Theory and Applications. Springer, Berlin (2009)
Rahman, A., Alsewari, A., Zamli, K.Z.: Design and Implementation of a Harmony-Search-Based Variable-Strength t-Way Testing Strategy with Constraints Support. Information and Software Technology 54(6), 553–568 (2012)
Bertolino, A., Mirandola, R., Peciola, E.: A Case Study in Branch Testing Automation. Journal of Systems and Software 38(1), 47–59 (1997)
Korel, B.: Automated Software Test Data Generation. IEEE Transactions on Software Engineering 16(8), 870–879 (1990)
Bouchachia, A.: An Immune Genetic Algorithm for Software Test Data Generation. In: Proc. of the 7th International Conference on Hybrid Intelligent Systems (HIS 2007), pp. 84–89. IEEE Press, New York (2007)
Alba, E., Chicano, F.: Observations in Using Parallel and Sequential Evolutionary Algorithms for Automatic Software Testing. Computers and Operations Research 35, 3161–3183 (2008)
Ferrer, J., Chicano, F., Alba, E.: Evolutionary Algorithms for the Multi-Objective Test Data Generation Problem. Software: Practice and Experience 42(11), 1331–1362 (2012)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Mao, C. (2013). Structural Test Data Generation Based on Harmony Search. In: Tan, Y., Shi, Y., Mo, H. (eds) Advances in Swarm Intelligence. ICSI 2013. Lecture Notes in Computer Science, vol 7928. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-38703-6_42
Download citation
DOI: https://doi.org/10.1007/978-3-642-38703-6_42
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-38702-9
Online ISBN: 978-3-642-38703-6
eBook Packages: Computer ScienceComputer Science (R0)