Does Unit-Tested Code Crash? A Case Study of Eclipse

Efstathia Chioteli, Ioannis Batas, Diomidis Spinellis

Research output: Chapter in Book/Conference proceedings/Edited volumeConference contributionScientificpeer-review

Abstract

Context: Software development projects increasingly adopt unit testing as a way to identify and correct program faults early in the construction process. Code that is unit tested should therefore have fewer failures associated with it. Objective: Compare the number of field failures arising in unit tested code against those arising in code that has not been unit tested. Method: We retrieved 2 083 979 crash incident reports associated with the Eclipse integrated development environment project, and processed them to obtain a set of 126 026 unique program failure stack traces associated with a specific popular release. We then run the JaCoCo code test coverage analysis on the same release, obtaining results on the line, instruction, and branch-level coverage of 216 392 methods. We also extracted from the source code the classes that are linked to a corresponding test class so as to limit test code coverage results to 1 263 classes with actual tests. Finally, we correlated unit tests with failures at the level of 9 523 failing tested methods. Results: Unit-tested code does not appear to be associated with fewer failures. Conclusion: Unit testing on its own may not be a sufficient method for preventing program failures.

Original languageEnglish
Title of host publicationProceedings - 25th Pan-Hellenic Conference on Informatics, PCI 2021
EditorsMichael Gr. Vassilakopoulos, Nikitas N. Karanikolas
PublisherAssociation for Computing Machinery (ACM)
Pages260-264
Number of pages5
ISBN (Electronic)9781450395557
DOIs
Publication statusPublished - 26 Nov 2021
Externally publishedYes
Event25th Pan-Hellenic Conference on Informatics, PCI 2021 - Virtual, Online, Greece
Duration: 26 Nov 202128 Nov 2021

Publication series

NameACM International Conference Proceeding Series

Conference

Conference25th Pan-Hellenic Conference on Informatics, PCI 2021
Country/TerritoryGreece
CityVirtual, Online
Period26/11/2128/11/21

Keywords

  • Code coverage
  • Crash incident reports
  • Software reliability
  • Stack traces
  • Unit-testing

Fingerprint

Dive into the research topics of 'Does Unit-Tested Code Crash? A Case Study of Eclipse'. Together they form a unique fingerprint.

Cite this