Skip to main content
Log in

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

  • Research Article - Computer Engineering and Computer Science
  • Published:
Arabian Journal for Science and Engineering Aims and scope Submit manuscript

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 via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

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

    Article  Google Scholar 

  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)

    Google Scholar 

  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)

    Article  Google Scholar 

  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)

    Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  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)

    Google Scholar 

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

    Google Scholar 

  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)

    Google Scholar 

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

    Article  Google Scholar 

  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)

    Google Scholar 

  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)

    Article  Google Scholar 

  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. 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. 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)

    Google Scholar 

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

    Article  Google Scholar 

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

    Article  Google Scholar 

  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)

    Google Scholar 

  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)

    Article  Google Scholar 

  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. Korel, B.: Automated software test data generation. IEEE Trans. Softw. Eng. 16(8), 870–879 (1990)

    Article  Google Scholar 

  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)

    Google Scholar 

  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. Mann, M.; Sangwan, O.P.: Generating and prioritizing optimal paths using ant colony optimization. Comput. Ecol. Softw. 5(1), 1–15 (2015)

    Google Scholar 

  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. 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)

    Article  Google Scholar 

  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)

    Google Scholar 

  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. 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. 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)

    Article  Google Scholar 

  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)

    Google Scholar 

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

    Google Scholar 

  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)

    Article  Google Scholar 

  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. 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. 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. Marre, M.; Bertolino, A.: Using spanning sets for coverage testing. IEEE Trans. Softw. Eng. 29, 974–984 (2003)

    Article  Google Scholar 

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

    Google Scholar 

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

    MATH  Google Scholar 

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

    Google Scholar 

  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)

    Google Scholar 

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

    Google Scholar 

  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)

    MATH  Google Scholar 

  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)

    Article  Google Scholar 

  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)

    Article  Google Scholar 

  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. 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

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ramalingam Sujatha.

Rights and permissions

Reprints and permissions

About this article

Check for updates. 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

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s13369-017-2554-7

Keywords

Navigation