What Code Is Deliberately Excluded from Test Coverage and Why?
Test coverage is largely used to assess test effectiveness. In practice, not all code is equally important for coverage analysis, for instance, code that will not be executed during tests is irrelevant and can actually harm the analysis. Some coverage tools provide support for code exclusion from coverage reports, however, we are not yet aware of what code tends to be excluded nor the reasons behind it. This can support the creation of more accurate coverage reports and reveal novel and harmful usage cases. In this paper, we provide the first empirical study to understand code exclusion practices in test coverage. We mine 55 Python projects and assess commit messages and code comments to detect rationales for exclusions. We find that (1) over 1/3 of the projects perform deliberate coverage exclusion; (2) 75% of the code are already created using the exclusion feature, while 25% add it over time; (3) developers exclude non-runnable, debug-only, and defensive code, but also platform-specific and conditional importing; and (4) most code is excluded because it is already untested, low-level, or complex. Finally, we discuss implications to improve coverage analysis and shed light on the existence of biased coverage reports.
I am a Professor in the Department of Computer Science at UFMG, Brazil. Research interests: software evolution, software repository mining, software quality, and empirical software engineering. I received my PhD in Computer Science from the University of Lille / Inria, France. During three years, I was a Professor at FACOM/UFMS. Before, I was a Postdoctoral researcher at the ASERG/UFMG group. I was also a software developer at Inria, Lille, France and a research intern at Siemens, Erlangen, Germany.
Tue 18 MayDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
17:00 - 17:50 | |||
17:01 4mTalk | What Code Is Deliberately Excluded from Test Coverage and Why? Technical Papers Andre Hora UFMG Pre-print Media Attached | ||
17:05 3mTalk | AndroR2: A Dataset of Manually-Reproduced Bug Reports for Android apps Data Showcase Tyler Wendland University of Minnesota, Jingyang Sun University of Bristish Columbia, Junayed Mahmud George Mason University, S M Hasan Mansur George Mason University, Steven Huang University of Bristish Columbia, Kevin Moran George Mason University, Julia Rubin University of British Columbia, Canada, Mattia Fazzini University of Minnesota | ||
17:08 3mTalk | Apache Software Foundation Incubator Project Sustainability Dataset Data Showcase Likang Yin University of California, Davis, Zhiyuan Zhang University of California, Davis, Qi Xuan Institute of Cyberspace Security, Zhejiang University of Technology, Hangzhou 310023, China, Vladimir Filkov University of California at Davis, USA | ||
17:11 4mTalk | Leveraging Models to Reduce Test Cases in Software Repositories Technical Papers Pre-print Media Attached | ||
17:15 4mTalk | Which contributions count? Analysis of attribution in open source Technical Papers Jean-Gabriel Young University of Vermont, amanda casari Open Source Programs Office, Google, Katie McLaughlin Open Source Programs Office, Google, Milo Trujillo University of Vermont, Laurent Hébert-Dufresne University of Vermont, James P. Bagrow University of Vermont Pre-print Media Attached | ||
17:19 4mTalk | On Improving Deep Learning Trace Analysis with System Call Arguments Technical Papers Quentin Fournier Polytechnique Montréal, Daniel Aloise Polytechnique Montréal, Seyed Vahid Azhari Ciena, François Tetreault Ciena Pre-print | ||
17:23 27mLive Q&A | Discussions and Q&A Technical Papers |
Go directly to this room on Clowdr