摘要: 为解决传统程序插桩技术存在代码膨胀和运行时间较长的问题,提出对可执行代码进行控制流路径覆盖消除冗余的插桩策略。依据该策略设计一种针对Java可执行代码的单元测试工具,完成程序执行路径跟踪和覆盖率分析。对测试工具进行功能验证和性能分析,结果表明,该策略能够有效减少插桩点数量,降低插桩对被测程序时间特性的影响。
关键词:
动态分析,
单元测试,
程序插桩,
可执行代码,
覆盖率分析,
路径跟踪
Abstract: Traditional program instrumentation can increase the executing time greatly and bring a great code bloat. In order to eliminate the impact of program instrumentation, a strategy based on control flow path coverage for executable code to eliminate redundant is presented. And a unit test tools for Java executable code is designed to achieve program execution path tracking and coverage analysis. Results show that both the number of instrumentation probes and runtime overhead of instrumentation are reduced effectively.
Key words:
dynamic analysis,
unit test,
program instrumentation,
executable code,
coverage rate analysis,
path tracking
中图分类号:
王轶, 蒋同海, 董军, 周喜. 基于路径覆盖插桩的可执行代码测试工具实现[J]. 计算机工程, 2012, 38(5): 35-37,40.
WANG Die, JIANG Tong-Hai, DONG Jun, ZHOU Chi. Implementation of Executable Code Test Tools Based on Path Coverage Instrumentation[J]. Computer Engineering, 2012, 38(5): 35-37,40.