Generating Test Data for Path Coverage Based Testing Using Genetic Algorithms

  • Madhumita Panda
  • Durga Prasad Mohapatra
Conference paper
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 216)


In this paper, we have developed an approach to generate test data for path coverage based testing using genetic algorithm. We have used control flow graph and cyclomatic complexity of the example program to find out the number of feasible paths present in the program and compared it with the actual number of paths covered by genetic algorithm. We have used genetic algorithm for generating test data automatically. We have shown that our algorithm is giving cent percent coverage, successfully covering all feasible paths. In our approach, we have observed that genetic algorithm is much more effective in generating test data within less time period, giving better coverage.


Control flow graph Cyclomatic complexity Connection matrix Genetic algorithm Test data Fitness function Path coverage 


  1. 1.
    Harman, M., McMinn, P.: A theoretical and empirical study of search-based testing, local, global, and hybrid search. IEEE Trans. Softw. Engg. 36(2) (2010)Google Scholar
  2. 2.
    Pargas, Harrold, Peck: Test -data generation using genetic algorithms. J. Softw. Test. Verif. Realiab. Wiley (1999)Google Scholar
  3. 3.
    Goldberg: Genetic algorithms in search, optimization and machine learning. Addison-Wesley, Massachusetts (1989)Google Scholar
  4. 4.
    Mathew: Genetic algorithm. IIT, Bombay. Google Scholar
  5. 5.
    Mall, R.: Fundamentals of software engineering 3rd Edn. PHI Publications, New DelhiGoogle Scholar
  6. 6.
    Michael, C.C., Graw, G.M., Schatz, M.A.: Generating software test data by evolution. IEEE Trans. Softw. Engg. 27(12) (2001)Google Scholar
  7. 7.
    Diaz, Tuya, Blanco: Automated software testing using a metaheuristic technique based on tabu search, pp. 310–313 (2003). doi: 10.1109/ASE.2003.1240327
  8. 8.
    Hermadi, Ahmed, King: Genetic algorithm based test data generator 1. doi: 10.1109/CEC.2003.1299560
  9. 9.
    Ghiduk, Harrold, Girgis: Using genetic algorithms to aid test-data generation for data-flow coverage (2007). doi: 10.1109/ASPEC.2007.73Google Scholar
  10. 10.
    Ramamoorthy, Ho, Chen: On the automated generation of program test data. IEEE Trans. Softw. Engg. SE-2(4) (1976)Google Scholar
  11. 11.
    Harman, King: Automated test data generation using search based software engineering. ISBN:978-0-7695-2971-2, doi: 10.1109/AST.2007
  12. 12.
    Howden: Reliability of the path analysis testing strategy. IEEE Trans. Softw. Engg. SE-2(5) (1976)Google Scholar
  13. 13.
    Holland: Adaptation in natural and artificial systems, 2nd edn. MIT Press, MIT, CambridgeGoogle Scholar
  14. 14.
    Korel: Automated software test data generation. IEEE Trans. Softw. Engg. 16 (1990)Google Scholar

Copyright information

© Springer India 2014

Authors and Affiliations

  1. 1.Department of MCASeemanta Engineering CollegeMayurbhanjIndia
  2. 2.Department Of Computer Science and EngineeringNational Institute Of TechnologyRourkelaIndia

Personalised recommendations