paperbot · PL 论文追踪

全部论文 待读 收藏

P2 An automated approach to estimating code coverage measures via execution logs

一种通过执行日志估算代码覆盖率的自动化方法
ASE Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering2018匹配度 2/10 · 该论文使用程序分析从执行日志估算代码覆盖率,属于软件测试/程序分析方向,并包含百度工业落地案例,但完全不涉及 LLM/Agentic、浮点程序分析或贝叶斯程序分析,与用户当前核心研究交叉点距离较远。引用 63 inbox
Boyuan Chen, Jian Song, Peng Xu, Xing Hu, Zhen Ming (Jack) Jiang
crossref: 2026-09-12

AI 速览

一句话:提出 LogCoCo,利用执行日志与程序分析自动估算方法、语句和分支覆盖率,准确率超过 96%。

代码覆盖率是评估和改进测试套件的常用指标,但现有覆盖率工具因工程实现困难、运行时开销大、结果不完整等问题,通常只能用于单元测试和集成测试阶段。本文提出自动化方法 LogCoCo,利用现成的执行日志来估算代码覆盖率。LogCoCo 借助程序分析技术将执行日志与对应的代码路径进行匹配,从而估算方法覆盖、语句覆盖和分支覆盖三种覆盖率准则。作者在一个开源系统 HBase 以及来自百度的五个商业系统上开展了案例研究,覆盖单元测试、集成测试和基准测试等多种测试活动。结果表明,在九组实验中有七组 LogCoCo 的估算准确率超过 96%,且其结果可用于评估和改进现有测试套件。百度的合作方目前正考虑在日常工作中采用 LogCoCo。

问题
现有代码覆盖率工具由于工程难度、性能开销和结果不完整等限制,通常仅能用于单元测试和集成测试,难以在更广泛的测试活动中衡量覆盖率。
方法
LogCoCo 使用程序分析技术将执行日志与对应的代码路径相匹配,进而自动估算方法覆盖率、语句覆盖率和分支覆盖率。
评估
在一个开源系统 HBase 和来自百度的五个商业系统上进行案例研究,涵盖单元测试、集成测试与基准测试,九组实验中有七组准确率超过 96%,并验证了结果可用于改进测试套件。
原文摘要(Abstract)

Software testing is a widely used technique to ensure the quality of software systems. Code coverage measures are commonly used to evaluate and improve the existing test suites. Based on our industrial and open source studies, existing state-of-the-art code coverage tools are only used during unit and integration testing due to issues like engineering challenges, performance overhead, and incomplete results. To resolve these issues, in this paper we have proposed an automated approach, called LogCoCo, to estimating code coverage measures using the readily available execution logs. Using program analysis techniques, LogCoCo matches the execution logs with their corresponding code paths and estimates three different code coverage criteria: method coverage, statement coverage, and branch coverage. Case studies on one open source system (HBase) and five commercial systems from Baidu and systems show that: (1) the results of LogCoCo are highly accurate (>96% in seven out of nine experiments) under a variety of testing activities (unit testing, integration testing, and benchmarking); and (2) the results of LogCoCo can be used to evaluate and improve the existing test suites. Our collaborators at Baidu are currently considering adopting LogCoCo and use it on a daily basis.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot4787,
  title = {An automated approach to estimating code coverage measures via execution logs},
  author = {Boyuan Chen and Jian Song and Peng Xu and Xing Hu and Zhen Ming (Jack) Jiang},
  booktitle = {ASE},
  year = {2018},
  doi = {10.1145/3238147.3238214}
}