Skip to main content

Automatic Test Data Generation Using a Genetic Algorithm

  • Conference paper
Computational Science and Its Applications – ICCSA 2013 (ICCSA 2013)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7972))

Included in the following conference series:

Abstract

The use of metaheuristic search techniques for the automatic generation of test data has been a burgeoning interest for many researchers in recent years. Previous attempts to automate the test generation process have been limited, having been constrained by the size and complexity of software, and the basic fact that in general, test data generation is an undecidable problem. Metaheuristic search techniques offer much promise in regard to these problems. Metaheuristic search techniques are high-level frameworks, which utilize heuristics to seek solutions for combinatorial problems at a reasonable computational cost. In this paper, we present a new evolutionary approach for automated test data generation for structural testing. Our method presents several noteworthy features: It uses a newly defined program modeling allowing an easy program manipulation. Furthermore, instead of affecting a unique value for each input variable, we assign to each input an interval. This representation has the advantage of delimiting first the input value and to refine the interval progressively. In this manner, the search space is explored more efficiently. We use an original fitness function, which expresses truthfully the individual quality. Furthermore, we define a crossover operator allowing to effectively improving individuals.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. The Software-artifact Infrastructure Repository, http://sir.unl.edu/portal/index.html

  2. Baker, J.E.: Reducing bias and inefficiency in the selection algorithm. In: Grefenstette, J.J. (ed.) Proceedings of the Second International Conference on Genetic Algorithms. Lawrence Erlbaum Associates Publishers (1987)

    Google Scholar 

  3. Baresel, A., Binkley, D., Harman, M., Korel, B.: Evolutionary testing in the presence of loop-assigned flags: a testability transformation approach. In: Avrunin, G.S., Rothermel, G. (eds.) ISSTA, pp. 108–118. ACM (2004)

    Google Scholar 

  4. Baresel, A., Sthamer, H., Schmidt, M.: Fitness function design to improve Evolutionary structural testing. In: GECCO 2002: Proceedings of the Genetic and Evolutionary Computation Conference, July 9-13, pp. 1329–1336. Morgan Kaufmann Publishers, San Francisco (2002)

    Google Scholar 

  5. Bottaci, L.: Instrumenting programs with flag variables for test data search by genetic algorithms. In: GECCO 2002: Proceedings of the Genetic and Evolutionary Computation Conference, July 9-13, pp. 1337–1342. Morgan Kaufmann Publishers, New York (2002)

    Google Scholar 

  6. Briand, L.C., Labiche, Y., Shousha, M.: Stress testing real-time systems with genetic algorithms. In: Beyer, H.-G., O’Reilly, U.-M. (eds.) Proceedings of the Genetic and Evolutionary Computation Conference, GECCO 2005, June 25-29, pp. 1021–1028. ACM, Washington DC (2005)

    Chapter  Google Scholar 

  7. Baresel, A., Wegener, J., Sthamer, H.: Evolutionary test environment for automatic structural testing. Information & Software Technology 43(14), 841–854 (2001)

    Article  Google Scholar 

  8. Cousot, P., Cousot, R.: Abstract interpretation: A Unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Principales of Programming Languages, POPL 1977, pp. 238–252 (1977)

    Google Scholar 

  9. Dijkstra, E.: A discipline of programming. Prentice Hall (1976)

    Google Scholar 

  10. Derderian, K., Hierons, R., Harman, M., Guo, Q.: Automated Unique Input Output sequence generation for conformance testing of FSMs. The Computer Journal 49(3), 331–344 (2006)

    Article  Google Scholar 

  11. Harman, M., Hu, L., Hierons, R.M., Wegener, J., Sthamer, H., Baresel, A., Roper, M.: Testability transformation. IEEE Transactions on Software Engineering 30(1), 3–16 (2004)

    Article  Google Scholar 

  12. Hermadi, I., Ahmed, M.: Genetic algorithm based test data generator. In: Sarker, R., Reynolds, R., Abbass, H., Tan, K.C., McKay, B., Essam, D., Gedeon, T. (eds.) Proceedings of The 2003 Congress on Evolutionary Computation CEC 2003, Canberra, December 8-12, pp. 85–91 (2003)

    Google Scholar 

  13. Aguirre, A.H., Rionda, S.B., Coello Coello, C.A., Lizárraga, G.L., Montes, E.M.: Handling Constraints using Multiobjective Optimization Concepts. International Journal for Numerical Methods in Engineering 59(15), 1989–2017 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  14. Jones, B., Sthamer, H., Eyres, D.: Automatic structural testing using genetic algorithms. Software Engineering Journal 11(5), 299–306 (1996)

    Article  Google Scholar 

  15. King, J.C.: Symbolic execution and program testing. Communications of the ACM 19(7), 385–394 (1976)

    Article  MATH  Google Scholar 

  16. Korel, B.: Automated software test data generation. IEEE Transactions on Software Engineering 16(8), 870–879 (1990)

    Article  Google Scholar 

  17. Mansour, N., Salame, M.: Data generation for path testing. Software Quality Journal 12(2), 121–134 (2004)

    Article  Google Scholar 

  18. Martello, S., Toth, P.: Knapsack Problems: Algorithms and Computer Implementations. Wiley, New York (1990)

    MATH  Google Scholar 

  19. McGraw, G., Michael, C., Schatz, M.: Generating software test data by evolution. IEEE Transactions on Software Engineering 27(12), 1085–1110 (2001)

    Article  Google Scholar 

  20. McMinn, P.: Search-based software test data generation: A survey. Software Testing, Verification and Reliability 14(2), 105–156 (2004)

    Article  Google Scholar 

  21. McMinn, P.: IGUANA: Input generation using automated novel algorithms. A plug and play research tool. Technical Report, Department of Computer Science, University of Sheffield (2007)

    Google Scholar 

  22. McMinn, P., Binkley, D., Harman, M.: Testability transformation for efficient automated test data search in the presence of nesting. In: Proceedings of the Third UK Software Testing Workshop, pp. 165–182 September (2005)

    Google Scholar 

  23. Mühlenbein, H., Schlierkamp-Voosen, D.: Predictive models for the breeder genetic algorithm: I. continuous parameter optimization. Evolutionary Computation 1(1), 25–49 (1993)

    Article  Google Scholar 

  24. Jefferson Offutt, A.: An integrated system for automatically generating test data. In: Ng, P.A., Ramamoorthy, C.V., Seifert, L.C., Yeh, R.T. (eds.) Proceedings of the First International Conference on Systems Integration, pp. 694–701. IEEE Computer Society Press, Morristown (1990)

    Chapter  Google Scholar 

  25. Pargas, R., Harrold, M., Peck, R.: Test-data generation using genetic algorithms. Software Testing, Verification and Reliability 9(4), 263–282 (1999)

    Article  Google Scholar 

  26. Radio Technical Commission for Aeronautics. RTCA DO178-B Software considerations in airborne systems and equipment certification (1992)

    Google Scholar 

  27. Tracey, N., Clark, J., Mander, K.: Automated program flaw finding using simulated annealing. In: International Symposium on Software Testing and Analysis (ISSTA 1998), pp. 73–81 (March 1998)

    Google Scholar 

  28. Wang, H.-C., Jeng, B.: Structural testing using memetic algorithm. In: Proceedings of the Second Taiwan Conference on Software Engineering, Taipei, Taiwan (2006)

    Google Scholar 

  29. Wegener, J., Baresel, A., Sthamer, H.: Evolutionary test environment for automatic structural testing. Information and Software Technology 43(14), 841–854 (2001)

    Article  Google Scholar 

  30. Whitley, D.: The GENITOR algorithm and selection pressure: Why rank-based allocation. In: Schaffer, J.D. (ed.) Proc. of the Third Int. Conf. on Genetic Algorithms, pp. 116–121. Morgan Kaufmann, San Mateo (1989)

    Google Scholar 

  31. Xanthakis, S., Ellis, C., Skourlas, C., Le Gall, A., Katsikas, S., Karapoulios, K.: Application of genetic algorithms to software testing (Application des algorithmes génétiques au test des logiciels). In: 5th International Conference on Software Engineering and its Applications, Toulouse, France, pp. 625–636 (1992)

    Google Scholar 

  32. Xiao, M., El-Attar, M., Reformat, M., Miller, J.: Empirical evaluation of optimization algorithms when used in goal-oriented automated test data generation techniques. Empirical Software Engineering 12(2), 183–239 (2007)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Aleb, N., Kechid, S. (2013). Automatic Test Data Generation Using a Genetic Algorithm. In: Murgante, B., et al. Computational Science and Its Applications – ICCSA 2013. ICCSA 2013. Lecture Notes in Computer Science, vol 7972. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39643-4_41

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-39643-4_41

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-39642-7

  • Online ISBN: 978-3-642-39643-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics