An in-depth investigation into the relationships between structural metrics and unit testability in object-oriented systems

An in-depth investigation into the relationships between structural metrics and unit testability in object-oriented systems
复制标题

DOI:
10.1007/s11432-012-4745-x
复制
发表时间:
2012-12
期刊:
Science China Information Sciences
影响因子:
--
通讯作者:
Yuming Zhou;Hareton K. N. Leung;Qinbao Song;Jianjun Zhao;Hongmin Lu;Lin Chen;Baowen Xu
Yuming Zhou;Hareton K. N. Leung;Qinbao Song;Jianjun Zhao;Hongmin Lu;Lin Chen;Baowen Xu
中科院分区:
其他
文献类型:
--
作者:
Yuming Zhou;Hareton K. N. Leung;Qinbao Song;Jianjun Zhao;Hongmin Lu;Lin Chen;Baowen Xu

文献摘要

被引文献

相似文献

人们普遍认为,类的结构属性是决定其单元可测试性的重要因素。然而,很少有实证研究来检验阶级结构属性的实际影响。本文采用多元线性回归(MLR)和偏最小二乘回归(PLSR)来研究一类结构特性度量指标与单元可测试性之间的关系。所研究的结构度量涵盖五个属性维度,包括大小、内聚、耦合、继承和复杂性。基于开源软件系统的研究结果表明:(1)大多数结构度量与单元可测试性在预期方向上具有统计相关性,其中规模、复杂性和耦合度量是最重要的预测因子;(2)基于结构度量的多元回归模型对类的单元可测试性排序较好,但不能准确预测类的单元可测试性;(3)从MLR到PLSR的转变可以显著提高类的单元可测试性排序能力,但不能提高预测类的单元测试工作量的能力。
There is a common belief that structural properties of classes are important factors to determine their unit testability. However, few empirical studies have been conducted to examine the actual impact of structural properties of classes. In this paper, we employ multiple linear regression (MLR) and partial least square regression (PLSR) to investigate the relationships between the metrics measuring structural properties and unit testability of a class. The investigated structural metrics cover five property dimensions, including size, cohesion, coupling, inheritance, and complexity. Our results from open-source software systems show that: (1) most structural metrics are statistically related to unit testability in an expected direction, among which size, complexity, and coupling metrics are the most important predictors; that (2) multivariate regression models based on structural metrics cannot accurately predict unit testability of classes, although they are better able to rank unit testability of classes; that (3) the transition from MLR to PLSR could significantly improve the ability to rank unit testability of classes but cannot improve the ability to predict the unit testing effort of classes.