Advertisement

Automatic Testing of Exception Handling Code

  • Christof Fetzer
  • Karin Högstedt
  • Pascal Felber
Chapter
  • 288 Downloads

Summary

Robust applications have to gracefully handle runtime errors that occur during program execution. Recent studies have shown, however, that code related to error handling is the most likely to contain software bugs: first, because it is almost never exercised under normal operation; and second, because errors modify the control flow of the program and render error handling code inherently complex. It is thus of utmost importance for software robustness to carefully and systematically test error handling code.

In this chapter, we describe automated tools to exercise and validate error handling code in modern programming languages that support exceptions, such as C++ and Java. We first introduce the notion of “failure atomicity,” which informally states that a software component must remain in a consistent state after an exception has been thrown for the error to be recoverable. This property is essential, because it constitutes a prerequisite for using the component in a robust application. We then propose automated mechanisms based on code instrumentation for injecting exceptions in a program and verify consistent operation of the error handling code. Experiments illustrate the usefulness of our techniques with real-world applications.

Keywords

Fault Injection Exception Handling Object Graph Error Handling Branch Coverage 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Christof Fetzer
    • 1
  • Karin Högstedt
    • 2
  • Pascal Felber
    • 3
  1. 1.Dresden University of TechnologyDresdenGermany
  2. 2.AT&T Labs—ResearchFlorham ParkUSA
  3. 3.Institut EURECOMSophia AntipolisFrance

Personalised recommendations