Test effectiveness refers to the capability of a test suite in exposing faults in software. It is crucial to be aware of factors that influence this capability. We aim at inferring the causal relationship between the two factors (i.e., Cover/Exec) and the capability of a test suite to expose and discover faults in software. Cover refers to the number of distinct test cases covering the statement and Exec equals the number of times a test suite executes a statement. We analyzed 459166 software faults from {12} Java programs. Bayesian statistics along with the back-door criterion was exploited for the purpose of causal inference. Furthermore, we examined the common pitfall measuring association, the mixture of causal and noncausal relationships, instead of causal association. The results show that Cover is of more causal association as against \textit{Exec}, and the causal association and noncausal one for those variables are statistically different. Software developers could exploit the results to design and write more effective test cases, which lead to discovering more bugs hidden in software.
翻译:测试有效性指测试套件暴露软件缺陷的能力。了解影响这一能力的因素至关重要。我们旨在推断两个因素(即Cover/Exec)与测试套件暴露和发现软件缺陷能力之间的因果关系。Cover指覆盖语句的不同测试用例数量,Exec等于测试套件执行某语句的次数。我们分析了来自12个Java程序的459166个软件缺陷。采用贝叶斯统计结合后门准则进行因果推断。此外,我们考察了将关联度量(因果与非因果关系混合)而非因果关联作为常见陷阱的问题。结果表明,与Exec相比,Cover具有更强的因果关联,且这些变量的因果关联与非因果关联存在统计学差异。软件开发人员可利用该结果设计和编写更有效的测试用例,从而发现软件中隐藏的更多缺陷。