Authors: M. Boopathi; R. Sujatha; C. Senthil Kumar
Addresses: Department of Mathematics, SSN College of Engineering, Kalavakkam, Tamil Nadu, India ' Department of Mathematics, SSN College of Engineering, Kalavakkam, Tamil Nadu, India ' Southern Regional Regulatory Centre, Atomic Energy Regulatory Board, Chennai, Tamil Nadu, India
Abstract: A Markov approach for test case generation and code coverage estimation using particle swarm optimisation technique is proposed. Initially, the DD-graph is taken from control flow graph of the software code by joining decision to decision. The DD-graph identifies the sequences of independent paths using c-uses and p-uses based on set theory approach and compared to cyclomatic complexity. Automatic test cases are generated and the nature of test cases are integer, float and Boolean variables. Using this initial test suite, the code coverage summary is generated using gcov code coverage analysis tool, the branch probability percentage is considered as TPM values with respect to each branch in the DD-graph. Path coverage is used as a fitness function which is the product of node coverage and TPM values. Iterate this algorithm until reaches 100% code coverage among each independent test path. The randomness of the proposed approach is compared to genetic algorithm.
Keywords: DD-graph; test paths identification; cyclomatic complexity; mixed data type variables; gcov coverage compiler; branch coverage; software testing; Markov chain; TPM-based fitness function; particle swarm optimisation technique; randomness and convergence speed; most critical paths.
International Journal of Computational Science and Engineering, 2020 Vol.23 No.4, pp.367 - 380
Received: 17 Jan 2020
Accepted: 14 Jul 2020
Published online: 10 Feb 2021 *