An Automated Approach to Estimating Code Coverage Measures via Execution Logs

被引:33
作者
Chen, Boyuan [1 ]
Song, Jian [2 ]
Xu, Peng [2 ]
Hu, Xing [2 ]
Jiang, Zhen Ming [1 ]
机构
[1] York Univ, Toronto, ON, Canada
[2] Baidu Inc, Beijing, Peoples R China
来源
PROCEEDINGS OF THE 2018 33RD IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMTED SOFTWARE ENGINEERING (ASE' 18) | 2018年
关键词
software testing; logging code; test coverage; empirical studies; software maintenance;
D O I
10.1145/3238147.3238214
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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 arid 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) wider 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.
引用
收藏
页码:305 / 316
页数:12
相关论文
共 66 条
  • [1] Adler Yoram, 2011, P 33 INT C SOFTW ENG
  • [2] Almasi M. Moein, 2017, IEEE ACM 39 INT C SO
  • [3] Ammann P., 2016, INTRO SOFTWARE TESTI
  • [4] [Anonymous], P 25 IEEE INT C SOFT
  • [5] [Anonymous], 1970, Notes on structured programming
  • [6] [Anonymous], 2010, P 1 ACM S CLOUD COMP, DOI DOI 10.1145/1807128.1807152
  • [7] [Anonymous], 2011, P 16 INT C ARCH SUPP
  • [8] [Anonymous], 2012, P 34 INT C SOFTW ENG
  • [9] [Anonymous], 2007, 3 INT WORKSH PRED MO
  • [10] [Anonymous], P 2013 INT C SOFTW E