Is bytecode instrumentation as good as source code instrumentation: An empirical study with industrial tools (Experience Report)
Is bytecode instrumentation as good as source code instrumentation: An empirical study with industrial tools (Experience Report)
复制标题
字节码检测和源代码检测一样好吗:工业工具的实证研究(经验报告)
DOI:
--
复制
发表时间:
2013
期刊:
影响因子:
--
通讯作者:
Lin Deng
中科院分区:
文献类型:
--
作者:
Nan Li;Xin Meng;A. Offutt;Lin Deng
Branch coverage (BC) is a widely used test criterion that is supported by many tools. Although textbooks and the research literature agree on a standard definition for BC tools measure BC in different ways. The general strategy is to “instrument” the program by adding statements that count how many times each branch is taken. But the details for how this is done can influence the measurement for whether a set of tests have satisfied BC. For example, the standard definition is based on program source, yet some tools instrument the bytecode to reduce computation cost. A crucial question for the validity of these tools is whether bytecode instrumentation gives results that are the same as, or at least comparable to, source code instrumentation. An answer to this question will help testers decide which tool to use. This research looked at 31 code coverage tools, finding four that support branch coverage. We chose one tool that instruments the bytecode and two that instrument the source. We acquired tests for 105 methods to discover how these three tools measure branch coverage. We then compared coverage on 64 methods, finding that the bytecode instrumentation method reports the same coverage on 49 and lower coverage on 11. We also found that each tool defined branch coverage differently, and what is called branch coverage in the bytecode instrumentation tool actually matches the standard definition for clause coverage.