Abstract
A software code may practically consist of many functions or subroutines with loops and branches. Also, the quantification of cyclomatic complexity is tedious, when the size of the software code is too large. Practically, size of the code for a real time application is generally large and dd-graph generation and maneuverability are tedious. Exhaustive testing is impractical and therefore it is not feasible to test all possible paths in the flow graph. Moreover, it is difficult to identify the uncovered portion, identification of most critical paths and hence unable to test all critical components in the software code. The present investigation focuses to display decisions along test paths in dd-graph of the software code using sparse matrix approach drawn through MATLAB biograph object module. In this approach, the concept of dd-graph (decision-to-decision graph) is taken from control flow graph of the software code by joining decision to decision. An identification of most critical paths and test case generation are done using artificial bee colony optimization. To avoid the testing complexity, the sparse matrix approach is used to demonstrate the most critical paths and display of the dd-graph using biograph object module by initializing the edge-node relationships is presented. The gcov code coverage analysis generates branch percentage probability as coverage summary which is considered as edge weights of the sparse matrix. This present approach is tested for the benchmark problem of “finding roots of the quadratic equation” software code.
Similar content being viewed by others
References
Adjacency List Generation [Online]. Available: https://www.sanfoundry.com/c-program-represent-graph-adjacency-list/. Accessed 12 December 2018
Aruna M, China VS, Sree Lakshmi A, Suma Latha P (2011) Automated tool to generate optimized control flow graph for C language. Softw Eng Technol 3:6
Srikanth A, Kulkarni NJ, Venkat Naveen K, Singh P, Srivastava PR (2011) Test case optimization using artificial bee colony algorithm. Advances in computing and communications, communications in computer and information science, vol 192. Springer, Berlin, Heidelberg, pp 570–579
Boopathi M, Sujatha R, Senthil Kumar C, Narasimman S, Rajan A (2017) Markov approach for quantifying the software code coverage using genetic algorithm in software testing. Int J Bio Inspir Comput 14(1):27–45
Boopathi M, Sujatha R, Senthil Kumar C, Narasimman S (2017) Quantification of software code coverage using artificial bee colony optimization based on Markov approach. Arab J Sci Eng 42(8):3503–3519
Convert edge list to adjacency matrix [Online]. Available: https://in.mathworks.com/matlabcentral/answers/231627-convert-edge-list-to-adjacency-matrix. Accessed 12 August 2018
Generate adjacency matrix of undirected graph [Online]. Available: https://stackoverflow.com/questions/33150887/generate-adjacency-matrix-of-undirected-graph. Accessed 12 August 2018
Generation of a weighted directed graphs [Online]. Available: https://in.mathworks.com/help/matlab/ref/graph.adjacency.html. Accessed 20 January 2019
Ghatasheh N, Faris H, Aljarah I (2015) Optimizing software effort estimation models using firefly algorithm. J Softw Eng Appl 8(3):133–143
Gough B (2004) An introduction to GCC: for the GNU Compilers gcc and g++. Network Theory Limited, United Kingdom
Graph max flow [Online]. Available: https://in.mathworks.com/help/bioinfo/ref/graphmaxflow.html. Accessed 22 July 2018
Graph min span tree [Online]. Available: https://in.mathworks.com/help/bioinfo/ref/graphisomorphism.html. Accessed 25 December 2018
Graph min span tree [Online]. Available: https://in.mathworks.com/help/bioinfo/ref/graphminspantree.html. Accessed 23 July 2018
Graph shortest path [Online]. Available: https://in.mathworks.com/help/bioinfo/ref/graphshortestpath.html. Accessed 23 January 2019
Graph traverse [Online]. Available: https://in.mathworks.com/help/bioinfo/ref/graphtraverse.html. Accessed 23 January 2019
How to generate random float number in C. Stack Overflow [Online]. Available: http://stackoverflow.com/questions/13408990/how-to-generate-random-float-number-in-c.Accessed 8 April 2014
Jatana N, Suri B (2019) Particle swarm and genetic algorithm applied to mutation testing for test data generation: a comparative evaluation. J King Saud Univ Comput Inform Sci: 1–8
Jeya Mala D, Mohan V, Kamalapriya M (2010) Automated software test optimisation framework-an artificial bee colony optimisationbased approach. IET Softw 4(5):334–348
Kaliraj S, Bharathi A (2019) Path testing based reliability analysis framework of component based software system. Measurement 144:20–32
Khamis AM, Girgis MR, Ghiduk A (2007) Automatic software test data generation for spanning sets coverage using genetic algorithms. Comput Inform 26:383–401
Matlab Biograph [Online]. Available: http://in.mathworks.com/help/bioinfo/ref/biograph.html. Accessed 22 August 2018
Mishra DB, Mishra R, Das KN, Acharya AA (2019) Test case generation and optimization for critical path testing using genetic algorithm. Soft computing for problem solving. Advances in intelligent systems and computing, vol 817. Springer, Singapore, pp 67–80
Rao KK, Raju G, Nagaraj S (2013) Optimizing the software testing efficiency by using a genetic algorithm–a design methodology. ACM SIGSOFT Softw Eng Notes 38(3):1–5
Sherry C, Sumeet Kaur S, Sukhjit Singh S (2016) A systematic review of applications of bee colony optimization. In: 2016 International conference on innovation and challenges in cyber security (ICICCS-INBUSH), pp 257–260
Singh T, Sandhu M (2012) An Approach in the software testing environment using artificial bee colony (ABC) optimization. ACM SIGSOFT Softw Eng Notes 58(21):5–7
Sparse matrix [Online]. Available: https://www.geeksforgeeks.org/sparse-matrix-representation/. Accessed 24 July 2018
Srivatsava PR, Mallikarjun B, Yang XS (2013) Optimal test sequence generation using firefly algorithm. Swarm Evolut Computat 8:44–53
Sujatha R, Boopathi M, Senthil Kumar C (2014) Genetic algorithm approach based on Markov model basic path testing for MIMO systems in software testing. SRESA’s Int Life Cycle Reliab Saf Eng 3(4):01–07
Tilahun SL, Ong HC (2012) Modified firefly algorithm. J Appl Math 2012:1–12
Varshney S, Mehrotra M (2016) Search-based test data generator for data flow dependencies using dominance concepts, branch distance and elitism. Arab J Scie Eng 41(3):853–881
Yan J, Zhang J (2008) An efficient method to generate feasible paths for basis path testing. Inform Process Lett 107:87–92
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, Principal for support.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Boopathi, M., Sujatha, R. & Senthil Kumar, C. Identification of most critical paths using sparse matrix in software testing. Life Cycle Reliab Saf Eng 10, 39–52 (2021). https://doi.org/10.1007/s41872-020-00142-z
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s41872-020-00142-z