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 actually written in real projects. In this paper the following was investigated: (i) the denotation of the test word in different natural languages; (ii) whether the test word correlates with the presence 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 weak correlation (r = 0.655) between the word test and test cases presence in a class; (ii) the proposed algorithm using static file analysis correctly detected 95\% of test cases; (iii) 15\% of the analyzed classes used main() function whose represent regular Java programs that test the production code without using any third-party framework. The identification of such tests is very low due to implementation diversity. The results may be leveraged to more quickly identify and locate test cases in a repository, to understand practices in customized testing solutions and to mine tests to improve program comprehension in the future.
翻译:软件测试是十分重要的质量保证(QA)组成部分之一。 许多研究人员在测试动机和如何进行测试或不应进行测试方面处理测试过程,然而,从建议中并不知道测试是如何实际项目中实际写成的。在本文中,调查了以下内容:(一) 测试单词的批注不同自然语言;(二) 测试单词是否与测试案例的存在相关;(三) 测试框架大多使用什么。对从4.3M GitHub项目集中彻底选定的38个GitHub开放源库进行了分析。我们用自动方法对803个班和170k班的测试案例进行了20,340个案例进行了分析。结果显示:(一) 单词测试和测试单类中的测试案例存在薄弱的关联性(r=0.655);(二) 使用静态文件分析正确检测95 ⁇ 测试案例的拟议算法;(三) 所使用的主要分析级的15 ⁇ 功能代表正常Java程序,在不使用任何第三方框架的情况下测试生产代码,对80340个班和170k班的测试案例进行了分析。 测试结果的确认,在标准测试中,以便快速地确定标准测试结果。在标准测试中进行。