An Empirical Study on the Adequacy of Testing in Open Source Projects
During software maintenance, testing is crucial to ensure the quality of code as it evolves. With the increasing size and complexity of software, adequate software testing has become increasingly important. Code coverage is an important metric to gauge the effectiveness of test cases and the adequac...
Saved in:
Main Authors: | , , , |
---|---|
Format: | text |
Language: | English |
Published: |
Institutional Knowledge at Singapore Management University
2014
|
Subjects: | |
Online Access: | https://ink.library.smu.edu.sg/sis_research/2433 https://ink.library.smu.edu.sg/context/sis_research/article/3433/viewcontent/apsec14.pdf |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Institution: | Singapore Management University |
Language: | English |
id |
sg-smu-ink.sis_research-3433 |
---|---|
record_format |
dspace |
spelling |
sg-smu-ink.sis_research-34332020-12-07T07:00:31Z An Empirical Study on the Adequacy of Testing in Open Source Projects Kochhar, Pavneet Singh Thung, Ferdian LO, David Lawall, Julia During software maintenance, testing is crucial to ensure the quality of code as it evolves. With the increasing size and complexity of software, adequate software testing has become increasingly important. Code coverage is an important metric to gauge the effectiveness of test cases and the adequacy of testing. However, what is the coverage level exhibited by large-scale open-source projects? What is the correlation between software metrics and the code coverage of the software?In this study, we investigate the state-of-the-practice of testing by measuring code coverage in open-source software projects. We examine over300 large open-source projects written in Java, coming from both the GitHub repository and the Debian Linux distribution, to measure the code coverage of their associated test cases. We analyse correlations between code coverage and relevant software metrics such as lines of code, cyclomatic complexity, and number of developers. We find that for the considered software developed under GitHub, average coverage is low, at 36%, and there is a significant negative correlation between coverage and both code size and complexity, i.e., coverage decreases with the increase in size and complexity of the software. The correlation between coverage and the number of developers is not significant. However, considering individual files in the GitHub software, coverage increases with the size and complexity, whereas the number of developers has no correlation with the code coverage. In contrast, the considered Debian software has a higher average rate of coverage, at 50%, but there is no correlation between coverage and any of the above metrics. Our results highlight the strengths and weaknesses of testing in open-source projects and make recommendations for future research. 2014-12-01T08:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/2433 info:doi/10.1109/APSEC.2014.42 https://ink.library.smu.edu.sg/context/sis_research/article/3433/viewcontent/apsec14.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Code coverage software metrics software testing test adequacy Computer Sciences Software Engineering |
institution |
Singapore Management University |
building |
SMU Libraries |
continent |
Asia |
country |
Singapore Singapore |
content_provider |
SMU Libraries |
collection |
InK@SMU |
language |
English |
topic |
Code coverage software metrics software testing test adequacy Computer Sciences Software Engineering |
spellingShingle |
Code coverage software metrics software testing test adequacy Computer Sciences Software Engineering Kochhar, Pavneet Singh Thung, Ferdian LO, David Lawall, Julia An Empirical Study on the Adequacy of Testing in Open Source Projects |
description |
During software maintenance, testing is crucial to ensure the quality of code as it evolves. With the increasing size and complexity of software, adequate software testing has become increasingly important. Code coverage is an important metric to gauge the effectiveness of test cases and the adequacy of testing. However, what is the coverage level exhibited by large-scale open-source projects? What is the correlation between software metrics and the code coverage of the software?In this study, we investigate the state-of-the-practice of testing by measuring code coverage in open-source software projects. We examine over300 large open-source projects written in Java, coming from both the GitHub repository and the Debian Linux distribution, to measure the code coverage of their associated test cases. We analyse correlations between code coverage and relevant software metrics such as lines of code, cyclomatic complexity, and number of developers. We find that for the considered software developed under GitHub, average coverage is low, at 36%, and there is a significant negative correlation between coverage and both code size and complexity, i.e., coverage decreases with the increase in size and complexity of the software. The correlation between coverage and the number of developers is not significant. However, considering individual files in the GitHub software, coverage increases with the size and complexity, whereas the number of developers has no correlation with the code coverage. In contrast, the considered Debian software has a higher average rate of coverage, at 50%, but there is no correlation between coverage and any of the above metrics. Our results highlight the strengths and weaknesses of testing in open-source projects and make recommendations for future research. |
format |
text |
author |
Kochhar, Pavneet Singh Thung, Ferdian LO, David Lawall, Julia |
author_facet |
Kochhar, Pavneet Singh Thung, Ferdian LO, David Lawall, Julia |
author_sort |
Kochhar, Pavneet Singh |
title |
An Empirical Study on the Adequacy of Testing in Open Source Projects |
title_short |
An Empirical Study on the Adequacy of Testing in Open Source Projects |
title_full |
An Empirical Study on the Adequacy of Testing in Open Source Projects |
title_fullStr |
An Empirical Study on the Adequacy of Testing in Open Source Projects |
title_full_unstemmed |
An Empirical Study on the Adequacy of Testing in Open Source Projects |
title_sort |
empirical study on the adequacy of testing in open source projects |
publisher |
Institutional Knowledge at Singapore Management University |
publishDate |
2014 |
url |
https://ink.library.smu.edu.sg/sis_research/2433 https://ink.library.smu.edu.sg/context/sis_research/article/3433/viewcontent/apsec14.pdf |
_version_ |
1770572145023254528 |