Code coverage differences of Java bytecode and source code instrumentation tools

被引:1
|
作者
Ferenc Horváth
Tamás Gergely
Árpád Beszédes
Dávid Tengeri
Gergő Balogh
Tibor Gyimóthy
机构
[1] University of Szeged,Department of Software Engineering
[2] University of Szeged,MTA
来源
Software Quality Journal | 2019年 / 27卷
关键词
Code coverage; White-box testing; Java bytecode instrumentation; Source code instrumentation; Coverage tools; Empirical study;
D O I
暂无
中图分类号
学科分类号
摘要
Many software testing fields, like white-box testing, test case generation, test prioritization, and fault localization, depend on code coverage measurement. If used as an overall completeness measure, the minor inaccuracies of coverage data reported by a tool do not matter that much; however, in certain situations, they can lead to serious confusion. For example, a code element that is falsely reported as covered can introduce false confidence in the test. This work investigates code coverage measurement issues for the Java programming language. For Java, the prevalent approach to code coverage measurement is using bytecode instrumentation due to its various benefits over source code instrumentation. As we have experienced, bytecode instrumentation-based code coverage tools produce different results than source code instrumentation-based ones in terms of the reported items as covered. We report on an empirical study to compare the code coverage results provided by tools using the different instrumentation types for Java coverage measurement on the method level. In particular, we want to find out how much a bytecode instrumentation approach is inaccurate compared to a source code instrumentation method. The differences are systematically investigated both in quantitative (how much the outputs differ) and in qualitative terms (what the causes for the differences are). In addition, the impact on test prioritization and test suite reduction—a possible application of coverage measurement—is investigated in more detail as well.
引用
收藏
页码:79 / 123
页数:44
相关论文
共 50 条
  • [41] SJBCD: A Java']Java Code Clone Detection Method Based on Bytecode Using Siamese Neural Network
    Wan, Bangrui
    Dong, Shuang
    Zhou, Jianjun
    Qian, Ying
    [J]. APPLIED SCIENCES-BASEL, 2023, 13 (17):
  • [42] A Tool for Automated Certification of Java']Java Source Code in Maude
    Alba-Castro, M.
    Alpuente, M.
    Escobar, S.
    Ojeda, P.
    Romero, D.
    [J]. ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2009, 248 : 19 - 29
  • [43] Declarative Intraprocedural Flow Analysis of Java']Java Source Code
    Nilsson-Nyman, Emma
    Hedin, Gorel
    Magnusson, Eva
    Ekman, Torbjoern
    [J]. ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2009, 238 (05) : 155 - 171
  • [44] JConstHide: A Framework for Java']Java Source Code Constant Hiding
    Sivadasan, Praveen
    Lal, P. Sojan
    Sivadasan, Naveen
    [J]. JOURNAL OF INFORMATION ASSURANCE AND SECURITY, 2009, 4 (01): : 21 - 29
  • [45] Topology structure and centrality in a java source code
    Ying, Long
    Ding, De-Wu
    [J]. Proceedings - 2012 IEEE International Conference on Granular Computing, GrC 2012, 2012, : 787 - 789
  • [46] Object-oriented processing of Java']Java source code
    Eichelberger, H
    von Gudenberg, RW
    [J]. SOFTWARE-PRACTICE & EXPERIENCE, 2004, 34 (12): : 1157 - 1185
  • [47] AUTOMATIC DETECTING AND REMOVING CLONES IN JAVA']JAVA SOURCE CODE
    Bublik, Tomas
    Virius, Miroslav
    [J]. SOFTWARE DEVELOPMENT 2011, 2011, : 10 - 18
  • [48] Automatic Source Code Summarization of Context for Java']Java Methods
    McBurney, Paul W.
    McMillan, Collin
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2016, 42 (02) : 103 - 119
  • [49] Automatic certification of Java']Java source code in rewriting logic
    Alba-Castro, Mauricio
    Alpuente, Maria
    Escobar, Santiago
    [J]. FORMAL METHODS FOR INDUSTRIAL CRITICAL SYSTEMS, 2008, 4916 : 200 - 217
  • [50] Set of tools for native code generation for the Java']Java virtual machine
    Esteire, OA
    Lovelle, JMC
    [J]. ACM SIGPLAN NOTICES, 1998, 33 (03) : 73 - 79