WCSE 2017
ISBN: 978-981-11-3671-9 DOI: 10.18178/wcse.2017.06.031

Number of Test Cases Required in Achieving Statement, Branch and Path Coverage using ‘gcov’: An Analysis

Ram Chandra Bhushan, Dharmendra Kumar Yadav

Abstract— In software development, code coverage is a mechanism used to know the degree to which a program is executed when a particular test suite executes on it. The facts regarding code coverage as a forecaster of software quality may be contradictory and inconclusive. However, an estimation of the software testing practices practiced by the majority of the software professionals can help researchers to know how code coverage is being used. It is required to know for software development professionals that whether all the statements, branches and paths of source code are getting covered or not. Manual testing is difficult for most of the applications that is why testing process has been automated. But, in case of automated software testing, what should be the number of test cases required to achieve maximum coverage is not known. Most of the time even after executing several test cases, code coverage is not maximized. As per the earlier research, code coverage data provides us an important insight for our test cases and test suit’s effectiveness and answers about parts of our source code that are executed? The primary objective of the paper is to present analytical results statistically for several codes of C and C++. Finally, it has been concluded that what should be the maximum limit for number of test cases required in achieving maximum statement, branch and path coverage.

Index Terms— Code Coverage, Statement, Branch, Path, Cyclomatic Complexity.

Ram Chandra Bhushan, Dharmendra Kumar Yadav
Department of Computer Science & Engineering, Motilal Nehru National Institute of Technology Allahabad, INDIA

[Download]


Cite: Ram Chandra Bhushan, Dharmendra Kumar Yadav, "Number of Test Cases Required in Achieving Statement, Branch and Path Coverage using ‘gcov’: An Analysis," Proceedings of 2017 the 7th International Workshop on Computer Science and Engineering, pp. 176-180, Beijing, 25-27 June, 2017.