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.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call