Skip to main content

Generation of Test Data Using Genetic Algorithm and Constraint Solver

  • Chapter
  • First Online:
Advanced Topics in Intelligent Information and Database Systems (ACIIDS 2017)

Part of the book series: Studies in Computational Intelligence ((SCI,volume 710))

Included in the following conference series:

Abstract

Search-based testing techniques using genetic algorithm (GA) can automatically generate test data that achieves high coverage on almost any given program under test. GA casts the path coverage test data generation as an optimization problem and applies efficient search-based algorithms to find suitable test cases. GA approaches scale well and can handle any source code and test criteria, but it still has some degrades when program under test has critical path clusters. This paper presents a method for improving GA efficiency by integrating a constraint solver to solve path conditions in which regular GA cannot generate test data for coverage. The proposed approach is also applied to some programs under test. Experimental results demonstrate that improved GA can generate suitable test data has higher path coverage than the regular one.

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 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 169.99
Price excludes VAT (USA)
  • Durable hardcover 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

Similar content being viewed by others

References

  1. Antonia, B.: Software testing research: achievements, challenges, dreams. In: Future of Software Engineering, pp. 85–103. IEEE Computer Society, Washington (2007)

    Google Scholar 

  2. Myers, G.J.: The Art of Software Testing, 2nd edn. Wiley (2004)

    Google Scholar 

  3. Kernighan, B.W., Plauger, P.J.: The Elements of Programming Style. McGraw-Hill Inc, New York (1982)

    MATH  Google Scholar 

  4. Weyuker, E.J.: The applicability of program schema results to programs. Int. J. Parallel Prog. 8, 387–403 (1979)

    MathSciNet  MATH  Google Scholar 

  5. Pasareanu, C.S., Visser, W., Bushnell, D., Geldenhuys, J., Mehlitz, P., Rungta, N.: Symbolic PathFinder: integrating symbolic execution with model checking for java bytecode analysis. Autom. Softw. Eng. J. (2013)

    Google Scholar 

  6. Michael, G.M., Schatz, M.: Generating software test data by evolution. IEEE Trans. Softw. Eng. 27, 1085–1110 (2001)

    Article  Google Scholar 

  7. Korel, B.: Automated software test data generation. IEEE Trans. Softw. Eng. 16, 870–879 (1990)

    Article  Google Scholar 

  8. Wegener, J., Baresel, A., Sthamer, H.: Evolutionary test environment for automatic structural testing. Inf. Softw. Technol. 43, 841–854 (2001)

    Article  Google Scholar 

  9. Wegener, J., Kerstin, B., Hartmut, P.: Automatic test data generation for structural testing of embedded software systems by evolutionary testing. In: Genetic and Evolutionary Computation Conference. Morgan Kaufmann Publishers Inc. (2002)

    Google Scholar 

  10. Levin, S., Yehudai, A.: Evolutionary testing: a case study. In: Hardware and Software, Verification and Testing, pp. 155–165 (2007)

    Google Scholar 

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

    Google Scholar 

  12. Joachim, W., Baresel, A., Harmen, S.: Suitability of evolutionary algorithms for evolutionary testing. In: 26th International Computer Software and Applications Conference on Prolonging Software Life: Development and Redevelopment. IEEE Computer Society, Washington (2002)

    Google Scholar 

  13. Malburg, J., Fraser, G.: Search-based testing using constraint-based mutation. J. Softw. Test. Verif. Reliab. 24(6), 472–495 (2014)

    Article  Google Scholar 

  14. Moura, L.D., Bjørner, N.: Z3: An efficient SMT solver. In: 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pp. 337–340. Springer Press, Berlin (2008)

    Google Scholar 

  15. Java programming lectures. https://www.inf.unibz.it/~calvanese/teaching/04-05-ip/lecture-notes/uni05.pdf

  16. Lin, J.C., Yeh, P.L.: Using genetic algorithms for test case generation in path testing. In: 9th Asian Test Symposium, pp. 241–246. IEEE Computer Society, Washington (2000)

    Google Scholar 

  17. Jones, B.F., Sthamer, H.H., Eyres, D.E.: Automatic structural testing using genetic algorithms. Softw. Eng. 11(5), 299–306 (1996)

    Article  Google Scholar 

  18. Chen, Y., Zhong, Y.: Automatic path-oriented test data generation using a multi-population genetic algorithm. In: 4th International Conference on Natural Computation, vol 1, pp. 566–570 (2008)

    Google Scholar 

  19. Thi, D.N., Hieu, V.D., Ha, N.V.: A technique for generating test data using genetic algorithms. In: International Conference on Advanced Computing and Applications (accepted). IEEE Press, Can Tho (2016)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ngoc-Thi Dinh .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this chapter

Cite this chapter

Dinh, NT., Vo, HD., Vu, TD., Nguyen, VH. (2017). Generation of Test Data Using Genetic Algorithm and Constraint Solver. In: Król, D., Nguyen, N., Shirai, K. (eds) Advanced Topics in Intelligent Information and Database Systems. ACIIDS 2017. Studies in Computational Intelligence, vol 710. Springer, Cham. https://doi.org/10.1007/978-3-319-56660-3_43

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-56660-3_43

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-56659-7

  • Online ISBN: 978-3-319-56660-3

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics