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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Antonia, B.: Software testing research: achievements, challenges, dreams. In: Future of Software Engineering, pp. 85–103. IEEE Computer Society, Washington (2007)
Myers, G.J.: The Art of Software Testing, 2nd edn. Wiley (2004)
Kernighan, B.W., Plauger, P.J.: The Elements of Programming Style. McGraw-Hill Inc, New York (1982)
Weyuker, E.J.: The applicability of program schema results to programs. Int. J. Parallel Prog. 8, 387–403 (1979)
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)
Michael, G.M., Schatz, M.: Generating software test data by evolution. IEEE Trans. Softw. Eng. 27, 1085–1110 (2001)
Korel, B.: Automated software test data generation. IEEE Trans. Softw. Eng. 16, 870–879 (1990)
Wegener, J., Baresel, A., Sthamer, H.: Evolutionary test environment for automatic structural testing. Inf. Softw. Technol. 43, 841–854 (2001)
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)
Levin, S., Yehudai, A.: Evolutionary testing: a case study. In: Hardware and Software, Verification and Testing, pp. 155–165 (2007)
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)
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)
Malburg, J., Fraser, G.: Search-based testing using constraint-based mutation. J. Softw. Test. Verif. Reliab. 24(6), 472–495 (2014)
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)
Java programming lectures. https://www.inf.unibz.it/~calvanese/teaching/04-05-ip/lecture-notes/uni05.pdf
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)
Jones, B.F., Sthamer, H.H., Eyres, D.E.: Automatic structural testing using genetic algorithms. Softw. Eng. 11(5), 299–306 (1996)
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)
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)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)