Abstract

Automated tests are often considered an indicator of project quality. In this paper, we performed a large analysis of 6.3 M public GitHub projects using Java as the primary programming language. We created an overview of tests occurrence in publicly available GitHub projects and the use of test frameworks in them. The results showed that 52% of the projects contain at least one test case. However, there is a large number of example tests that do not represent relevant production code testing. It was also found that there is only a poor correlation between the number of the word “test” in different parts of the project (e.g., file paths, file name, file content, etc.) and the number of test cases, creation date, date of the last commit, number of commits, or number of watchers. Testing framework analysis confirmed that JUnit is the most used testing framework with a 48% share. TestNG, considered the second most popular Java unit testing framework, occurred in only 3% of the projects.

Highlights

  • Automated testing is considered an inevitable part of high-quality software projects [1]

  • Many researchers have tried to clarify the motivation of writing tests [3,4,5], the impact of Test-driven development (TDD) on code quality [6,7,8,9], the effectiveness of tests on defective code [10,11,12], or the popularity of testing frameworks [13]

  • Typical Number of “test” Occurrences Figure 2 shows the number of occurrences of the word “test” in all projects analyzed via the Github API

Read more

Summary

Introduction

Automated testing is considered an inevitable part of high-quality software projects [1]. To further analyze the relationships between code quality and the occurrence of tests, we need to better understand how developers write tests in industrial projects. It is interesting to see the ratio of the word “test” in different parts of the project to the number of test cases and other project’s metadata, such as number of watchers, number of commits, etc. This information can be useful in terms of further development of testing tools, using information from tests during program comprehension as well as mining repositories in other studies

Objectives
Methods
Results
Discussion
Conclusion
Full Text
Paper version not known

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

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.