DOI QR코드

DOI QR Code

An Adequacy Based Test Data Generation Technique Using Genetic Algorithms

  • Malhotra, Ruchika (Dept. of Software Engineering, Department of Computer Engineering, Delhi Technological University) ;
  • Garg, Mohit (Dept. of Software Engineering, Department of Computer Engineering, Delhi Technological University)
  • Received : 2010.12.06
  • Accepted : 2011.03.18
  • Published : 2011.06.30

Abstract

As the complexity of software is increasing, generating an effective test data has become a necessity. This necessity has increased the demand for techniques that can generate test data effectively. This paper proposes a test data generation technique based on adequacy based testing criteria. Adequacy based testing criteria uses the concept of mutation analysis to check the adequacy of test data. In general, mutation analysis is applied after the test data is generated. But, in this work, we propose a technique that applies mutation analysis at the time of test data generation only, rather than applying it after the test data has been generated. This saves significant amount of time (required to generate adequate test cases) as compared to the latter case as the total time in the latter case is the sum of the time to generate test data and the time to apply mutation analysis to the generated test data. We also use genetic algorithms that explore the complete domain of the program to provide near-global optimum solution. In this paper, we first define and explain the proposed technique. Then we validate the proposed technique using ten real time programs. The proposed technique is compared with path testing technique (that use reliability based testing criteria) for these ten programs. The results show that the adequacy based proposed technique is better than the reliability based path testing technique and there is a significant reduce in number of generated test cases and time taken to generate test cases.

Keywords

References

  1. K.K. Aggarwal, Y. Singh, “Software Engineering”, New Age International Publishers, 2006.
  2. J.W. Duran, S.C. Ntafos, “An evaluation of random testing”, IEEE Trans. on Software Engineering, 10(4): 438–443,1984. https://doi.org/10.1109/TSE.1984.5010257
  3. R. DeMillo, A.J. Offutt, “Constraint-based automatic test data generation”, IEEE Trans. on Software Engineering 17(9):900–910,1991. https://doi.org/10.1109/32.92910
  4. Yong Chen, Yong Zhong, "Automatic Path-oriented Test Data Generation Using a Multi-Population Genetic Algorithm", Fourth International Conference on Natural Computation, $78-0-7695-3304-9/08{\copyright}2008 $IEEE, pp:566-570. https://doi.org/10.1109/ICNC.2008.388
  5. C. Michael, G. McGraw, M. Schatz, “Generating software test data by evolution”, IEEE Transactions on Software Engineering 27(12) (2001) 1085-1110. https://doi.org/10.1109/32.988709
  6. B.F. Jones, H.-H. Sthamer, D.E. Eyres, Automatic structural testing using genetic algorithms”, Software Engineering Journal September 1996, pp.299-306.
  7. S. Khor, P. Grogono, “Using a Genetic Algorithm and Formal Concept Analysis to Generate Branch Coverage Test Data Automatically”, Proceedings of the 19th International Conference on Automated Software Engineering (ASE”04), 1068-3062/04 ${\copyright}$ IEEE.
  8. A.S. Ghiduk, M.J. Harrold, M.R. Girgis, "Using Genetic Algorithms to Aid Test-Data Generation for Data-Flow Coverage", 14th Asia-Pacific Software Engineering Conference, 1530-1362/07 ${\copyright}$ 2007 IEEE, pp.41-48. https://doi.org/10.1109/ASPEC.2007.73
  9. A.S. Andreou, K.A. Economides, A.A. Sofokleous, "An automatic software test data generation scheme based on data flow criteria and genetic algorithms", Seventh International Conference on Computer and Information Technology, 0-7695-2983-6/07 ${\copyright}$ 2007 IEEE, pp.867-872. https://doi.org/10.1109/CIT.2007.97
  10. L. Clarke, “A system to generate test data and symbolically execute programs IEEE Trans. on Software Eng., Vol.SE-2, No.3, pp.215-. 222, Sept. 1976. https://doi.org/10.1109/TSE.1976.233817
  11. B. Korel 1990, “Automated software test generation”, IEEE Trans. on Software Engineering 16(8): 870–879. https://doi.org/10.1109/32.57624
  12. C.C. Michael, G.E. McGraw, M.A. Schatz, C.C. Walton, “Genetic Algorithms for Dynamic Test Data Generation”, $0-8186- 7961-1/97{\copyright}1997$ IEEE, pp.307-308.
  13. J. Wegener, A. Baresel, and H. Sthamer, Evolutionary Test Environment for Automatic Structural Testing, Information and Software Technology, 43:841–854, 2001. https://doi.org/10.1016/S0950-5849(01)00190-2
  14. N. Mansour, M. Salame, “Data Generation for Path Testing”, Software Quality Journal, 12, 121–136, 2004, Kluwer Academic Publishers. https://doi.org/10.1023/B:SQJO.0000024059.72478.4e
  15. K. Dahal, A. Hossain, “Test Data Generation from UML State Machine Diagrams using GAs”, International Conference on Software Engineering Advances, 0-7695 2937-2/07 ${\copyright}$ 2007 IEEE. pp:834-840.
  16. A. Bouchachia, "An Immune Genetic Algorithm for Software Test Data Generation", Seventh International Conference on Hybrid Intelligent Systems, 0-7695-2946-1/7 ${\copyright}$ 2007 IEEE. pp.84-89. https://doi.org/10.1109/HIS.2007.37
  17. X. Shen, Q. Wang, P. Wang, Bo Zhou, “Automatic Generation of Test Case based on GATS Algorithm”, 2007AA04Z148, supported by Nation 863 Project.
  18. P.R. Srivastava, T. Kim, “Application of Genetic Algorithm in Software Testing”, International Journal of Software Engineering and Its Applications, Vol. 3, No. 4, October 2009, pp.87-96.
  19. A. Rauf, S. Anwar, "Automated GUI Test Coverage Analysis using GA", 2010 Seventh International Conference on Information Technology, 978-0-7695-3984-3/10 ${\copyright}$ 2010 IEEE, pp.1057-1062 https://doi.org/10.1109/ITNG.2010.95
  20. D.E. Goldberg, Genetic Algorithms: in Search, Optimization & Machine Learning, Addison Wesley, MA. 1989.
  21. Y. Jia, M. Harman, "An Analysis and Survey of the Development of Mutation Testing", IEEE Transactions on Software Engineering, 0098-5589/10/$26.00 ${\copyright}$ 2010 IEEE. https://doi.org/10.1109/TSE.2010.62
  22. M. Harman, "Automated Test Data Generation using Search Based Software Engineering", Second International Workshop on Automation of Software Test (AST'07) 0-7695-2971-2/07 $20.00 ${\copyright}$ 2007IEEE. https://doi.org/10.1109/AST.2007.4
  23. M. R Girgis, “Automatic Test Data Generation For Data Flow Testing Using A Genetic Algorithm”, Journal of Universal Computer Science, Vol.11, No.6, pp.898-915, June 2005.
  24. P. McMinn, “Search-based software test data generation: A survey”, Software Testing, Verification and Reliability, 14(2):105–156, June 2004. https://doi.org/10.1002/stvr.294
  25. M. Harman, J. Wegener, “Search based testing (keynote)”, In 6th Meta heuristics International Conference (MIC 2005),Vienna, Austria, Aug. 2005.
  26. J. W. Laski, B. Korel, “Data flow oriented program testing strategy”, IEEE Transactions on Software Engineering, Vol.9, No.3, pp.347-354, 1983. https://doi.org/10.1109/TSE.1983.236871
  27. S. Rapps, E. J. Weyuker, “Selecting software test data using data flow information”, IEEE Transactions on Software Engineering, Vol.11, No.4, pp.367-375, 1985. https://doi.org/10.1109/TSE.1985.232226
  28. B. W. Kernighan, P. J. Plauger, The Elements of Programming Style, McGraw-Hill, Inc. New York, NY, USA, 1982.
  29. S. Xanthakis, C. Ellis, C. Skourlas, A. Le Gall, S. Katsikas, K. Karapoulios, “Application of genetic algorithm to software testing”, In Proceedings of 5th International Conference on Software Engineering and its Applications Toulouse, France, 1992, pp.625-636.
  30. J. C. Lin, P. L. Yeh, “Automatic test data generation for path testing using Gas”, Information Sciences, vol. 131, 2001, pp.47-64. https://doi.org/10.1016/S0020-0255(00)00093-1
  31. M. A. Ahmed, I. Hermadi, “GAbased multiple paths test data generator”, Computers and Operations Research (2007).

Cited by

  1. An algorithm on fairness verification of mobile sink routing in wireless sensor network vol.17, pp.5, 2013, https://doi.org/10.1007/s00779-012-0536-z
  2. Bio-inspired metaheuristics: evolving and prioritizing software test data 2018, https://doi.org/10.1007/s10489-017-1003-3
  3. Quantification of Software Code Coverage Using Artificial Bee Colony Optimization Based on Markov Approach vol.42, pp.8, 2017, https://doi.org/10.1007/s13369-017-2554-7
  4. Higher order mutation testing: A Systematic Literature Review vol.25, 2017, https://doi.org/10.1016/j.cosrev.2017.06.001
  5. Software Defect Prediction Using Genetic Programming and Neural Networks vol.8, pp.4, 2017, https://doi.org/10.4018/IJOSSP.2017100102
  6. Test Path Prioritization from UML Activity Diagram Using a Hybridized Approach vol.8, pp.1, 2018, https://doi.org/10.4018/IJKBO.2018010106