TL;DR
This paper investigates how test cases are written in Java open source projects on GitHub, proposing an automated method that accurately detects test cases and analyzes testing practices across diverse projects.
Contribution
It introduces a static analysis algorithm that detects 97% of test cases in Java projects, providing insights into testing practices and test identification challenges.
Findings
Weak correlation (r=0.655) between 'test' word occurrences and test cases
Proposed algorithm detects 97% of test cases
15% of classes use main() for testing without frameworks
Abstract
Software testing is one of the very important Quality Assurance (QA) components. A lot of researchers deal with the testing process in terms of tester motivation and how tests should or should not be written. However, it is not known from the recommendations how the tests are written in real projects. In this paper, the following was investigated: (i) the denotation of the word "test" in different natural languages; (ii) whether the number of occurrences of the word "test" correlates with the number of test cases; and (iii) what testing frameworks are mostly used. The analysis was performed on 38 GitHub open source repositories thoroughly selected from the set of 4.3M GitHub projects. We analyzed 20,340 test cases in 803 classes manually and 170k classes using an automated approach. The results show that: (i) there exists a weak correlation (r = 0.655) between the number of occurrences…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
