通过动态分析理解类级可测试性
Understanding Class-level Testability Through Dynamic Analysis
摘要:
人们普遍认为,软件测试既具有挑战性又耗时。了解可能对测试工作产生积极或消极影响的因素将指出减少这种工作的可能性。因此,有一个显着的研究机构,调查静态代码属性和可测试性之间的关系。在本文中报告的工作补充了这一机构的研究,提供了一个经验性的评估,在面向对象(OO)系统的运行时属性和类级的可测试性之间的关联程度。使用动态代码属性的动机来自于这些度量的成功,它们提供了对软件质量的多个维度的更完整的洞察。特别是,我们调查生产代码的运行时特性,动态耦合和关键类,和内部类级可测试性之间的潜在关系。类的可测试性在这里被认为是在单元测试的级别上,并且使用两种不同的度量来验证这些单元测试。所选择的度量与测试范围和结构有关:一个度量旨在度量单元测试的大小,由代码的测试行表示,另一个度量旨在反映预期的设计,由测试用例的数量表示。在这项研究中,我们发现动态耦合和关键类有显着的相关性与类级的可测试性措施。因此,我们建议,这些属性可以被用来作为类级可测性的指标。这些结果增强了我们目前的知识,并应帮助该地区的研究人员建立在以前的结果,认为是相关的可测试性和测试的因素。我们的研究结果也应该有利于从业者在未来的类可测试性规划和维护活动。
英文摘要:
It is generally acknowledged that software testing is both challenging and time-consuming. Understanding the factors that may positively or negatively affect testing effort will point to possibilities for reducing this effort. Consequently there is a significant body of research that has investigated relationships between static code properties and testability. The work reported in this paper complements this body of research by providing an empirical evaluation of the degree of association between runtime properties and class-level testability in object-oriented (OO) systems. The motivation for the use of dynamic code properties comes from the success of such metrics in providing a more complete insight into the multiple dimensions of software quality. In particular, we investigate the potential relationships between the runtime characteristics of production code, represented by Dynamic Coupling and Key Classes, and internal class-level testability. Testability of a class is considered here at the level of unit tests and two different measures are used to characterise those unit tests. The selected measures relate to test scope and structure: one is intended to measure the unit test size, represented by test lines of code, and the other is designed to reflect the intended design, represented by the number of test cases. In this research we found that Dynamic Coupling and Key Classes have significant correlations with class-level testability measures. We therefore suggest that these properties could be used as indicators of class-level testability. These results enhance our current knowledge and should help researchers in the area to build on previous results regarding factors believed to be related to testability and testing. Our results should also benefit practitioners in future class testability planning and maintenance activities.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。