Advertisement

Springer Nature is making Coronavirus research free. View research | View latest news | Sign up for updates

Quantification of Software Code Coverage Using Artificial Bee Colony Optimization Based on Markov Approach

  • 133 Accesses

  • 1 Citations

Abstract

Software test suite generation and development of techniques to optimize the test suite are vital parts of the software development life cycle. In this paper, a combination of Markov chain and artificial bee colony (ABC) optimization techniques are adopted to attain the software code coverage. Initially, dd-graph is captured from the control flow graph of the source code and is represented as a Markov chain. The number of paths is obtained based on linear code sequence and jump (LCSAJ) coverage. LCSAJ is used to reduce the number of independent paths as compared to paths obtained by basis path testing. Automatic test cases are generated and based on the operation profile of the test suite; transition probabilities are obtained using gcov analysis tool. Further, ABC optimization is adopted to ensure software code coverage. The initial population is randomly selected from the test suite and populated for subsequent generations using the ABC algorithm. The test cases are generated for three mixed data type variables, namely integer, float and Boolean. The quality of the test cases is improved during every iteration of ABC optimization and traversed through number of LCSAJ-based independent paths thereby ensuring software code coverage. Finally, software code coverage is quantified using the fitness/happiness value computed as a product of node coverage and the corresponding transition probability values based on the path covered.

This is a preview of subscription content, log in to check access.

References

  1. 1.

    Kulkarni, N.J.; Naveen, K.V.; Singh, P.; Srivastava, P.R.: Test case optimization using artificial bee colony algorithm. In: Advances in Computing and Communications, pp. 570–579 (2011)

  2. 2.

    Ruchika, M.; Manju, K.: Test suite optimization using mutated artificial bee colony. In: Proceedings of International Conference on Advances in Communication, Network, and Computing, CNC. Elsevier, pp. 45–54 (2014)

  3. 3.

    Nazir, S.; Shahzad, S.; Riza, L.S.: Birthmark-based software classification using rough sets. Arab. J. Sci. Eng. 42, 859–871 (2017)

  4. 4.

    Rao, K.K.; Raju, G.; Nagaraj, S.: Optimizing the software testing efficiency by using a genetic algorithm—a design methodology. ACM SIGSOFT Softw. Eng. Notes 38(3), 1–5 (2013)

  5. 5.

    Mahajan, M.; Kumar, S.; Porwal, R.: Applying genetic algorithm to increase the efficiency of a data flow-based test data generation approach. ACM SIGSOFT Softw. Eng. Notes 37(5), 1–5 (2012)

  6. 6.

    Mohapatra, D.: GA based test case generation approach for formation of efficient set of dynamic slices. Int. J. Comput. Sci. Eng. 3(9), 3265–3274 (2012)

  7. 7.

    McCabe, T.J.: A complexity measure. IEEE Trans. Softw. Eng. SE-2 4(3), 308–320 (1976)

  8. 8.

    Mounika, M.; Reddy, D.V.: Test case selection for path testing using bee colony optimization. Elysium J. Eng. Res. Manag. 2(1), 1–7 (2015)

  9. 9.

    Srivastava, P.R.; Kim, T.: Application of genetic algorithm in software testing. Int. J. Softw. Eng. Appl. 3, 87–96 (2009)

  10. 10.

    Sujatha, R.; Boopathi, M.; Senthil Kumar, C.: Genetic algorithm approach based on Markov model and basic path testing for MIMO codes in software testing. Life Cycle Reliab. Saf. Eng. 3, 43–49 (2014)

  11. 11.

    McMinn, P.: Search-based software test data generation: a survey. Softw. Test. Verif. Reliab. 14(2), 105–156 (2004)

  12. 12.

    Panda, M.; Sarangi, P.P.: Performance analysis of test data generation for path coverage based testing using three meta-heuristic algorithms. Int. J. Comput. Sci. Inf. 3(2), 34–41 (2013)

  13. 13.

    Jeya Mala, D.; Mohan, V.; Kamalapriya, M.: Automated software test optimisation framework-an artificial bee colony optimisation-based approach. IET Softw. 4(5), 334–348 (2010)

  14. 14.

    Bala Takur, P.; Verma, T.: A survey on test case selection using optimization techniques in software testing. Int. J. Innov. Sci. Eng. Technol. 2(4), 593–596 (2015)

  15. 15.

    Sherry, C.; Sumeet Kaur, S.; Sukhjit Singh, S.: A systematic review of applications of bee colony optimization. In: 2016 1st International Conference on Innovation and Challenges in Cyber Security (ICICCS 2016), pp. 257–260 (2016)

  16. 16.

    Jeya Mala, D.; Mohan, V.: ABC tester-artificial bee colony based software test suite optimization approach. Int. J. Softw. Eng. 2(2), 15–43 (2009)

  17. 17.

    Harman, M.; Jones, B.F.: Search-based software engineering. Inf. Softw. Technol. 43(14), 833–839 (2001)

  18. 18.

    Malhotra, R.; Gafrg, M.: An adequacy based test data generation technique using genetic algorithms. J. Inf. Process. Codes 7(2), 363–384 (2011)

  19. 19.

    Malhotra, R.; Anand, C.; Jain, N.; Mittal, A.: Comparison of search based techniques for automated test data generation. Int. J. Comput. Appl. 95(23), 04–08 (2014)

  20. 20.

    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)

  21. 21.

    Khari, M.; Kumar, P.: A novel approach for software test data generation using cuckoo algorithm. In: Proceedings of the Second International Conference on Information and Communication Technology for Competitive Strategies. ACM. Mar 4, p 98 (2016)

  22. 22.

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

  23. 23.

    Dalal, S.; Chillar, R.S.: A novel technique for generation of test cases based on bee colony optimization and modified genetic algorithm (BCOmGA). Int. J. Comput. Appl. 68(19), 12–16 (2013)

  24. 24.

    Jeya Mala, D.; Kamalapriya, M.; Shobana, R.; Mohan, V.: A non-pheromone based intelligent swarm optimization technique in software test suite optimization. In: IAMA: 2009 International Conference on Intelligent Agent and Multi-agent Systems, IEEE Madras Section; IEEE Computer Society, Madras Chapter; Computer Society of India Div II; Council of Science & Industrial Research; Govt India, Department of Information Technology, pp. 188–192 (2009)

  25. 25.

    Mann, M.; Sangwan, O.P.: Generating and prioritizing optimal paths using ant colony optimization. Comput. Ecol. Softw. 5(1), 1–15 (2015)

  26. 26.

    Birt, J.R.; Sitte, R.: Optimizing testing efficiency with error-prone path identification and genetic algorithms. In: Proceedings of the Australian 2004 Software Engineering Conference. IEEE, pp. 106–115 (2004)

  27. 27.

    Jeya Mala, D.; Sabari Nathan, K.; Balamurugan, S.: Critical components testing using hybrid genetic algorithm. ACM SIGSOFT Softw. Eng. Notes 38(5), 01–13 (2013)

  28. 28.

    Murugan, R.; Mohan, M.R.: Artificial bee colony optimization for the combined heat and power economic dispatch problem. ARPN J. Eng. Appl. Sci. 7(5), 597–604 (2012)

  29. 29.

    Teodorovic, D.; Lucic, P.; Markovic, G.; Dell, M.O.: Bee colony optimization: principles and applications. In: 8th Seminar on Neural Network Applications in Electrical Engineering. NEUREL 2006, pp. 151–156 (2006)

  30. 30.

    Masaru, K.; Nakano, H.; Miyauchi, A.: An artificial bee colony algorithm for solving dynamic optimization problems. In: IEEE Congress on Evolutionary Computation (CEC), June 2013. Cancn, Mexico, pp. 20–23 (2013)

  31. 31.

    Gupta, N.; Mathur, A.P.; Soffa, M.L.: Automated test data generation using an iterative relaxation method. ACM SIGSOFT Softw. Eng. Notes 23(6), 231–244 (1998)

  32. 32.

    Singh, T.; Sandhu, M.K.: An Approach in the software testing environment using artificial bee colony (ABC) optimization. Int. J. Comput. Appl. 58(21), 5–7 (2012)

  33. 33.

    Koundal, N.; Ankur, S.; Mohsin, R.M.: Test case selection using bee colony optimization. Int. J. Sci. Res. 3(5), 1432–1436 (2014)

  34. 34.

    Lam, S.S.B.; Raju, M.H.P.; Ch, S.; Srivastav, P.R.: Automated generation of independent paths and test suite optimization using artificial bee colony. Proc. Eng. 30, 191–200 (2012)

  35. 35.

    Karnavel, K.; Santhoshkumar, J.: Automated software testing for application maintenance by using bee colony optimization algorithms (BCO). In: 2013 International Conference on Information Communication and Embedded Systems (ICICES). IEEE (ICICES 13), Chennai, India, pp. 327–330 (2013)

  36. 36.

    Arvinder K.; Goyal, S.: A bee colony optimization algorithm for fault coverage based regression test suite prioritization. Int. J. Adv. Sci. Technol. 29, 17–30 (2011)

  37. 37.

    Boopathi, M.; Sujatha, R.; Senthil Kumar, C.; Narasimman, S.: The mathematics of software testing using genetic algorithm. In: 3rd International Conference on Reliability, Infocom Technologies and Optimization (ICRITO) (Trends and Future Directions), pp. 1–6 (2014)

  38. 38.

    Marre, M.; Bertolino, A.: Using spanning sets for coverage testing. IEEE Trans. Softw. Eng. 29, 974–984 (2003)

  39. 39.

    Naik, K.; Tripathy, P.: Software Testing and Quality Assurance: Theory and Practice. Wiley, London (2010)

  40. 40.

    Pressman, R.S.: Software Engineering: A Practitioner’s Approach. Tata McGraw-Hill, New York (2005)

  41. 41.

    Mathur, A.P.: Foundations of Software Testing: Fundamental Algorithms and Techniques. Pearson Education Fifth Impression, South Asia (2011)

  42. 42.

    Suri, D.; Kaur, P.: Path based test suite augmentation using artificial bee colony algorithm. Int. J. Res. Appl. Sci. Eng. Technol. 2(9), 156–164 (2014)

  43. 43.

    Grough, B.; Stallman, R.: An introduction to GCC: for the GNU Compilers gcc and g\(++\). Network Theory Limited, Surrey (2004)

  44. 44.

    Khamis, A.M.; Girgis, M.R.; Ghiduk, A.S.: Automatic software test data generation for spanning sets coverage using genetic algorithms. Comput. Inf. 26, 383–401 (2007)

  45. 45.

    Arun Babu, P.; Senthil Kumar, C.; Murali, N.: A hybrid approach to quantify software reliability in nuclear safety codes. Ann. Nucl. Energy 50, 133–140 (2012)

  46. 46.

    Arun Babu, P.; Senthil Kumar, C.; Murali, N.; Jayakumar, T.: An intuitive approach to determine test adequacy in safety-critical software. ACM SIGSOFT Softw. Eng. Notes 37(5), 1–10 (2012)

  47. 47.

    How to generate random float number in C. Stack Overflow [Online]. http://stackoverflow.com/questions/13408990/how-to-generate-random-float-number-in-c. Accessed 8 Apr 2014

  48. 48.

    Maghali, I.; de Oliveira, S.; Schirru, R.; de Medeiros, J.A.C.C.: On the performance of an artificial bee colony optimization algorithm applied to the accident diagnosis in a PWR nuclear power plant. In: 2009 International Nuclear Atlantic Conference (2009)

Download references

Acknowledgements

The authors thank Atomic Energy Regulatory Board India Project No. AERB/CSRP/53/06/2013 for providing financial assistance to carry out this work. The authors thank SSN Management and Principal for support.

Author information

Correspondence to Ramalingam Sujatha.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Boopathi, M., Sujatha, R., Senthil Kumar, C. et al. Quantification of Software Code Coverage Using Artificial Bee Colony Optimization Based on Markov Approach. Arab J Sci Eng 42, 3503–3519 (2017). https://doi.org/10.1007/s13369-017-2554-7

Download citation

Keywords

  • Artificial bee colony
  • Markov chain
  • Dd-graph
  • LCSAJ coverage
  • Initial test suite
  • Path coverage