White Box Testing Using Genetic Algorithm—An Extensive Study

  • Deepti Bala MishraEmail author
  • Arup Abhinna Acharya
  • Srikumar Acharya
Part of the Intelligent Systems Reference Library book series (ISRL, volume 185)


In unit testing phase, the developers test each module of the Software Under Test (SUT) by going through the source code of the software. This process of testing source code is called as white box testing. In white box testing, test cases are generated through different coverage based and failt based testing techniques. Related research has found that, among all coverage based testing techniques, the path coverage based testing can detect about 65% of defects in a SUT. The test data generated through path testing can also be exercised for mutation analysis i.e. path coverage based test data can be used for achieving highest mutation score during mutation testing. This chapter briefly reviewed some of the related research work on different testing techniques used in white box testing, such as path testing, and mutation testing. Different Genetic Algorithm (GA) based techniques have been developed for automatic test data generation and optimization in white box testing.


Test data generation Test data optimization Genetic algorithm Path testing Mutation testing Critical path Mutation score 


  1. 1.
    Mathur, A.P.: Foundations of Software Testing, 2/e. Pearson Education, India (2013)Google Scholar
  2. 2.
    Sharma, A., Rishon, P., Aggarwal, A.: Software testing using genetic algorithms. Int. J. Comput. Sci. Eng. Surv.(IJCSES) 7(2), 21–33 (2016)Google Scholar
  3. 3.
    Mall, R.: Fundamentals of Software Engineering. PHI Learning Pvt. Ltd. (2018)Google Scholar
  4. 4.
    Mansour, N., Salame, M.: Data generation for path testing. Softw. Qual. J. 12(2), 121–136 (2004)CrossRefGoogle Scholar
  5. 5.
    Malhotra, R., Khari, M.: Heuristic search-based approach for automated test data generation: a survey. Int. J. Bio-Inspired Comput. 5(1), 1–18 (2013)CrossRefGoogle Scholar
  6. 6.
    Srivastava, P.R., Kim, T.-H: Application of genetic algorithm in software testing. Int. J. Softw. Eng. Its Appl. 3(4), 87–96 (2009)Google Scholar
  7. 7.
    Shimin, L., Zhangang, W.: Genetic algorithm and its application in the path-oriented test data automatic generation. Procedia Eng. 15, 1186–1190 (2011)CrossRefGoogle Scholar
  8. 8.
    Mishra, D.B., Bilgaiyan, S., Mishra, R., Acharya, A.A., Mishra, S.: A review of random test case generation using genetic algorithm. Indian J. Sci. Technol. 10(30) (2017)Google Scholar
  9. 9.
    Ahmed, A.A.F., Shaheen, M., Kosba, E.: Software testing suite prioritization using multi-criteria fitness function. In: 2012 22nd International Conference on Computer Theory and Applications (ICCTA), pp. 160–166. IEEE (2012)Google Scholar
  10. 10.
    Chauhan, N.: Software Testing: Principles and Practices. Oxford University Press, Oxford (2010)Google Scholar
  11. 11.
    Nidhra, S., Dondeti, J.: Black box and white box testing techniques-a literature review. Int. J. Embed. Syst. Appl. (IJESA) 2(2), 29–50 (2012)Google Scholar
  12. 12.
    Zhang, Y., Gong, D.: Generating test data for both paths coverage and faults detection using genetic algorithms: multi-path case. Front. Comput. Sci. 8(5), 726–740 (2014)MathSciNetCrossRefGoogle Scholar
  13. 13.
    Hermadi, I., Ahmed, M.A.: Genetic algorithm based test data generator. In: The 2003 Congress on Evolutionary Computation, CEC’03, vol. 1, pp. 85–91. IEEE (2003)Google Scholar
  14. 14.
    Khari, M., Kumar, P.: An extensive evaluation of search-based software testing: a review. Soft Comput., 1–14 (2017)Google Scholar
  15. 15.
    Huang, H., Liu, F., Yang, Z., Hao, Z.: Automated test case generation based on differential evolution with relationship matrix for IFOGSIM toolkit. IEEE Trans. Ind. Inform. 14(11), 5005–5016 (2018)CrossRefGoogle Scholar
  16. 16.
    Mohi-Aldeen, S.M., Mohamad, R., Deris, S.: Application of negative selection algorithm (NSA) for test data generation of path testing. Appl. Soft Comput. 49, 1118–1128 (2016)Google Scholar
  17. 17.
    Biswas, S., Kaiser, M.S., Mamun, S.A.: Applying ant colony optimization in software testing to generate prioritized optimal path and test data. In: 2015 International Conference on Electrical Engineering and Information Communication Technology (ICEEICT), pp. 1–6. IEEE (2015)Google Scholar
  18. 18.
    Mala, D.J., Mohan, V.: Quality improvement and optimization of test cases: a hybrid genetic algorithm based approach. ACM SIGSOFT Softw. Eng. Notes 35(3), 1–14 (2010)Google Scholar
  19. 19.
    Mishra, D.B., Mishra, R., Das, K.N., Acharya, A.A.: A systematic review of software testing using evolutionary techniques. In: Proceedings of 6th International Conference on Soft Computing for Problem Solving, pp. 174–184. Springer (2017)Google Scholar
  20. 20.
    Zhu, Z., Xu, X., Jiao, L.: Improved evolutionary generation of test data for multiple paths in search-based software testing. In: 2017 IEEE Congress on Evolutionary Computation (CEC), pp. 612–620. IEEE (2017)Google Scholar
  21. 21.
    Shahbazi, A., Miller, J.: Black-box string test case generation through a multi-objective optimization. IEEE Trans. Softw. Eng. 42(4), 361–378 (2016)CrossRefGoogle Scholar
  22. 22.
    Desikan, S., Ramesh, G.: Software Testing: Principles and Practice. Pearson Education, India (2006)Google Scholar
  23. 23.
    Gong, D., Tian, T., Yao, X.: Grouping target paths for evolutionary generation of test data in parallel. J. Syst. Softw. 85(11), 2531–2540 (2012)CrossRefGoogle Scholar
  24. 24.
    Girgis, M.R., Ghiduk, A.S., Abd-Elkawy, E.H.: Automatic generation of data flow test paths using a genetic algorithm. Int. J. Comput. Appl. 89(12), 29–36 (2014)Google Scholar
  25. 25.
    Mishra, D.B., Mishra, R., Acharya, A.A., Das, K.N.: Test case optimization and prioritization based on multi-objective genetic algorithm. Harmony Search and Nature Inspired Optimization Algorithms, pp. 371–381. Springer, Berlin (2019)Google Scholar
  26. 26.
    Godboley, S., Mohapatra, D.P., Das, A., Mall, R.: An improved distributed concolic testing approach. Softw.: Pract. Exp. 47(2), 311–342 (2017)Google Scholar
  27. 27.
    Ghiduk, A.S., Harrold, M.J., Girgis, M.R.: Using genetic algorithms to aid test-data generation for data-flow coverage. In: 14th Asia-Pacific Software Engineering Conference, 2007, APSEC 2007. pp. 41–48. IEEE (2007)Google Scholar
  28. 28.
    Gong, D., Yao, X.: Automatic detection of infeasible paths in software testing. IET Softw. 4(5), 361–370 (2010)CrossRefGoogle Scholar
  29. 29.
    Silva, R.A., de Souza, S.D.R.S., de Souza, P.S.L.: A systematic review on search based mutation testing. Inf. Softw. Technol. 81, 19–35 (2017)Google Scholar
  30. 30.
    Bashir, M.B., Nadeem, A.: Improved genetic algorithm to reduce mutation testing cost. IEEE Access 5, 3657–3674 (2017)Google Scholar
  31. 31.
    Rani, S., Suri, B.: An approach for test data generation based on genetic algorithm and delete mutation operators. In: 2015 2nd International Conference on Advances in Computing and Communication Engineering (ICACCE), pp. 714–718. IEEE (2015)Google Scholar
  32. 32.
    Deb, K.: Optimization for Engineering Design: Algorithms and Examples. PHI Learning Pvt. Ltd. (2012)Google Scholar
  33. 33.
    Haga, H., Suehiro, A.: Automatic test case generation based on genetic algorithm and mutation analysis. In: 2012 IEEE International Conference on Control System, Computing and Engineering (ICCSCE), pp. 119–123. IEEE (2012)Google Scholar
  34. 34.
    Gupta, M., Gupta, G.: Effective test data generation using genetic algorithms. J. Eng., Comput. Appl. Sci. 1(2), 17–21 (2012)Google Scholar
  35. 35.
    Kramer, O.: Genetic Algorithm Essentials, vol. 679. Springer, Berlin (2017)Google Scholar
  36. 36.
    Zhang, S., Zhang, Y., Zhou, H., He, Q.: Automatic path test data generation based on GA-PSO. In: 2010 IEEE International Conference on Intelligent Computing and Intelligent Systems (ICIS), vol. 1, pp. 142–146. IEEE (2010)Google Scholar
  37. 37.
    Mann, M.: Generating and prioritizing optimal paths using ant colony optimization. Comput. Ecol. Softw. 5(1), 1 (2015)Google Scholar
  38. 38.
    Lam, S.S.B., Raju, M.L.H.P., Ch, S., Srivastav, P.R. et al.: Automated generation of independent paths and test suite optimization using artificial bee colony. Procedia Eng. 30, 191–200 (2012)Google Scholar
  39. 39.
    Ahmed, M.A., Hermadi, I.: Ga-based multiple paths test data generator. Comput. Oper. Res. 35(10), 3107–3124 (2008)Google Scholar
  40. 40.
    Mishra, D.B., Mishra, R., Das, K.N., Acharya, A.A.: Test case generation and optimization for critical path testing using genetic algorithm. Soft Computing for Problem Solving, pp. 67–80. Springer, Berlin (2019)Google Scholar
  41. 41.
    Mishra, D.B., Mishra, R., Acharya, A.A., Das, K.N.: Test data generation for mutation testing using genetic algorithm. Soft Computing for Problem Solving, pp. 857–867. Springer, Berlin (2019)Google Scholar
  42. 42.
    Yao, X., Gong, D., Wang, W.: Test data generation for multiple paths based on local evolution. Chin. J. Electron. 24(1), 46–51 (2015)CrossRefGoogle Scholar
  43. 43.
    Jena, T., Mohanty, J.R.: Disaster recovery services in intercloud using genetic algorithm load balancer. Int. J. Electr. Comput. Eng. 6(4), 1828 (2016)Google Scholar
  44. 44.
    Goldberg, D.E.: Genetic Algorithms. Pearson Education, India (2006)Google Scholar
  45. 45.
    Garg, D., Garg, P.: Basis path testing using SGA & HGA with ExLB fitness function. Procedia Comput. Sci. 70, 593–602 (2015)CrossRefGoogle Scholar
  46. 46.
    Goldberg, D.E.: Real-coded genetic algorithms, virtual alphabets, and blocking. Complex Syst. 5(2), 139–167 (1991)Google Scholar
  47. 47.
    Lin, J.-C., Yeh, P.-L.: Using genetic algorithms for test case generation in path testing. In: Proceedings of the 9th Asian Test Symposium, 2000, (ATS 2000), pp. 241–246. IEEE (2000)Google Scholar
  48. 48.
    Singh, G., Gupta, N., Khosravy, M.: New crossover operators for real coded genetic algorithm (RCGA). In: 2015 International Conference on Intelligent Informatics and Biomedical Sciences (ICIIBMS), pp. 135–140. IEEE (2015)Google Scholar
  49. 49.
    Umbarkar, A.J., Sheth, P.D.: Crossover operators in genetic algorithms: a review. ICTACT J. Soft Comput. 6(1) (2015)Google Scholar
  50. 50.
    Das, K.N., Mishra, R.: Chemo-inspired genetic algorithm for function optimization. Appl. Math. Comput. 220, 394–404 (2013)zbMATHGoogle Scholar
  51. 51.
    Chen, Y., Zhong, Y.: Automatic path-oriented test data generation using a multi-population genetic algorithm. In: 4th International Conference on Natural Computation, 2008, ICNC’08, vol. 1, pp. 566–570. IEEE (2008)Google Scholar
  52. 52.
    Maragathavalli, P., Kanmani, S., Kirubakar, J.S., Sriraghavendrar, P., Prasad, A.S.: Automatic program instrumentation in generation of test data using genetic algorithm for multiple paths coverage. In: 2012 International Conference on Advances in Engineering, Science and Management (ICAESM), pp. 349–353. IEEE (2012)Google Scholar
  53. 53.
    Ghiduk, A.S.: Automatic generation of basis test paths using variable length genetic algorithm. Inf. Process. Lett. 114(6), 304–316 (2014)Google Scholar
  54. 54.
    Gong, D., Zhang, Y.: Generating test data for both path coverage and fault detection using genetic algorithms. Front. Comput. Sci. 7(6), 822–837 (2013)MathSciNetCrossRefGoogle Scholar
  55. 55.
    Khan, R., Amjad, M.: Automatic test case generation for unit software testing using genetic algorithm and mutation analysis. In: 2015 IEEE UP Section Conference on Electrical Computer and Electronics (UPCON), pp. 1–5. IEEE (2015)Google Scholar
  56. 56.
    Khan, R., Amjad, M.: Optimize the software testing efficiency using genetic algorithm and mutation analysis. In: 2016 3rd International Conference on Computing for Sustainable Global Development (INDIACom), pp. 1174–1176. IEEE (2016)Google Scholar
  57. 57.
    Khan, R., Amjad, M., Srivastava, A.K.: Generation of automatic test cases with mutation analysis and hybrid genetic algorithm. In: 2017 3rd International Conference on Computational Intelligence & Communication Technology (CICT), pp. 1–4. IEEE (2017)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  • Deepti Bala Mishra
    • 1
    Email author
  • Arup Abhinna Acharya
    • 2
  • Srikumar Acharya
    • 3
  1. 1.Department of Computer ScienceC.V. Raman College of EngineeringBhubaneswarIndia
  2. 2.School of Computer EngineeringKIIT UniversityBhubaneswarIndia
  3. 3.School of Applied SciencesKIIT UniversityBhubaneswarIndia

Personalised recommendations