Advertisement

Structural Test Data Generation Based on Harmony Search

  • Chengying Mao
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7928)

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).

Keywords

Test data generation harmony search fitness function branch coverage experimental evaluation 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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. 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. 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
  4. 4.
    Pargas, R.P., Harrold, M.J., Peck, R.: Automated Structural Testing Using Genetic Algorithms. Software Testing, Verification and Reliability 9(4), 263–282 (1999)CrossRefGoogle Scholar
  5. 5.
    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)CrossRefGoogle Scholar
  6. 6.
    Geem, Z.M., Kim, J., Loganathan, G.: A New Heuristic Optimization Algorithm: Harmony Search. Simulation 76(2), 60–68 (2001)CrossRefGoogle Scholar
  7. 7.
    Geem, Z.M.: Music-Inspired Harmony Search Algorithm: Theory and Applications. Springer, Berlin (2009)CrossRefGoogle Scholar
  8. 8.
    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)CrossRefGoogle Scholar
  9. 9.
    Bertolino, A., Mirandola, R., Peciola, E.: A Case Study in Branch Testing Automation. Journal of Systems and Software 38(1), 47–59 (1997)CrossRefGoogle Scholar
  10. 10.
    Korel, B.: Automated Software Test Data Generation. IEEE Transactions on Software Engineering 16(8), 870–879 (1990)CrossRefGoogle Scholar
  11. 11.
    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)CrossRefGoogle Scholar
  12. 12.
    Alba, E., Chicano, F.: Observations in Using Parallel and Sequential Evolutionary Algorithms for Automatic Software Testing. Computers and Operations Research 35, 3161–3183 (2008)zbMATHCrossRefGoogle Scholar
  13. 13.
    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)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Chengying Mao
    • 1
    • 2
  1. 1.School of Software and Communication EngineeringJiangxi University of Finance and EconomicsNanchangChina
  2. 2.The State Key Laboratory of Software EngineeringWuhan UniversityWuhanChina

Personalised recommendations