An empirical study on the effects of code visibility on program testability

Lei Ma, Cheng Zhang, Bing Yu, Hiroyuki Sato

研究成果: ジャーナルへの寄稿学術誌査読

6 被引用数 (Scopus)

抄録

Software testability represents the degree of ease with which a software artifact supports testing. When it is easy to detect defects in a program through testing, the program has high testability; otherwise, the testability of the program is low. As an abstract property of programs, testability can be measured by various metrics, which are affected by different factors of design and implementation. In object-oriented software development, code visibility is important to support design principles, such as information hiding. It is widely believed that code visibility has some effects on testability. However, little empirical evidence has been shown to clarify whether and how software testability is influenced by code visibility. We have performed a comprehensive empirical study to shed light on this problem. We first use code coverage as a concrete proxy for testability. We select 27 real-world software programs as subjects and ran two state-of-the-art automated testing tools, Randoop and EvoSuite, on these programs to analyze their code coverage, in comparison with that of developer-written tests. The results show that code visibility does not necessarily have effects on code coverage, but can significantly affect automated tools. Developer-written tests achieve similar coverage on code areas with different visibility, while low code visibility often leads to low code coverage for automated tools. In addition, we have developed two enhanced variants of Randoop that implement multiple strategies to handle code visibility. The results on Randoop variants show that different treatments on code visibility can result in significant differences in code coverage for automated tools. In the second part, our study uses fault detection rate as another concrete measurement of testability. We apply the automated testing tools on 357 real faults. The result of our in-depth analysis is consistent with that of the first part, demonstrating the significant effects of code visibility on program testability.

本文言語英語
ページ(範囲)951-978
ページ数28
ジャーナルSoftware Quality Journal
25
3
DOI
出版ステータス出版済み - 9月 1 2017
外部発表はい

!!!All Science Journal Classification (ASJC) codes

  • ソフトウェア
  • 安全性、リスク、信頼性、品質管理

フィンガープリント

「An empirical study on the effects of code visibility on program testability」の研究トピックを掘り下げます。これらがまとまってユニークなフィンガープリントを構成します。

引用スタイル