A Generic Fault Model for Quality Assurance

Alexander Pretschner, Dominik Holling, Robert Eschbach, Matthias GemmarModels 2013

TL;DR

This paper introduces a general framework for defining fault models, moving beyond ad-hoc approaches to systematically understand and generate tests that are more likely to uncover actual software defects. By formalizing fault models as transformations that create incorrect software versions, the authors provide a unified way to analyze existing fault models and derive more effective test cases.

What Problem Does This Paper Address?

Software testing often relies on structural coverage criteria (like statement or branch coverage) to guide test selection. While these criteria are easy to implement, there's a persistent lack of strong evidence that they are significantly better than random testing at finding faults. This is partly because these criteria don't directly tell us what kind of faults are likely to occur. The authors argue that a more effective approach is to use fault models, which are based on understanding how software typically fails. However, existing fault models are often described in isolation, making it hard to compare them or build a unified testing strategy. This paper aims to bridge this gap by proposing a general, formal definition of a fault model that can encompass various existing models and guide the derivation of tests specifically designed to expose these modeled faults.

Methods

The core of the paper is the introduction of a generic fault model. This model defines a fault as a textual or graphical difference between a correct and an incorrect software version (Behavior Description or BD). This difference is represented by a transformation, denoted as α, which maps a correct BD to a set of incorrect BDs.

Crucially, the authors then define the induced failure domain, denoted as φ(αk, s), which is the set of all inputs that could potentially cause a failure related to a specific fault class K for any BD written to a specification s. This φ is what allows us to partition the input space.

The paper also introduces approximated fault models (α̃ and φ̃) because precise definitions are often impractical. These approximations are key to deriving practical test cases. The paper then uses these formal definitions to instantiate and analyze various existing fault models from the literature, showing how they fit into this generic framework.

Datasets

Not discussed in the paper. The paper focuses on a theoretical framework and its instantiation with existing fault models, rather than empirical evaluation on specific datasets.

Key Insights and Ideas

  • Fault Models as Transformations: The fundamental insight is to view fault models not just as descriptions of what can go wrong, but as formal transformations that generate incorrect software versions. This provides a concrete mechanism for understanding and generating faults.
  • Bridging Fault Injection and Test Derivation: The paper connects the idea of using fault injection for test assessment to using fault models for test derivation. By understanding how faults are introduced, we can create tests that are more likely to trigger them.
  • Unified Framework for Existing Models: The generic fault model provides a common language and structure to understand and compare diverse fault models (e.g., stuck-at, division by zero, mutation testing, FSM faults, etc.). This unification is a significant contribution to the field.
  • Effectiveness is Key: The paper emphasizes that a "good" fault model should be effective, meaning it captures faults that are likely to occur in practice and leads to tests that are better than random testing. They propose a formal way to measure this effectiveness.
  • Beyond Syntax: While faults are defined as syntactic differences, the ultimate goal is to understand their impact on behavior and failures, linking the code-level changes to observable system behavior.

Key Results

The paper's primary contribution is the formalization of a generic fault model and its instantiation with numerous existing fault models. It demonstrates how various fault models, such as:

  • Stuck-at faults: Replacing logic gate outputs with fixed values (0 or 1).
  • Division by zero: Removing input sanitization for divisors.
  • Mutation testing: Applying syntactic changes to code.
  • Finite State Machine (FSM) faults: Modifying output or transfer functions.
  • Limit testing: Focusing on boundary values of input domains.
  • Combinatorial testing: Considering interactions between parameters.

can all be viewed as instances of this generic framework. The paper provides the mathematical definitions (α, φ, α̃, φ̃) and shows how they can be used to derive input space partitions for test selection strategies. While quantitative results from empirical evaluations are not presented, the theoretical framework lays the groundwork for deriving more effective test sets.

Limitations and Future Work

  • Lack of Empirical Evaluation: The authors acknowledge that they have not yet evaluated the effectiveness of their operationalized fault models empirically. This is a significant area for future work.
  • Approximation Challenges: While approximated fault models are introduced, defining precise and comprehensive approximations (α̃, φ̃) can still be challenging.
  • Model Completeness: The authors do not claim to capture all possible fault models, noting that faults for which no model exists cannot be targeted.
  • Future Work: The authors plan to develop a prototype for semi-automatically generating test cases using their fault models and to empirically evaluate these models. They also intend to explore sources of experience data for fault models and investigate the effectiveness of fault models in conjunction with other quality assurance techniques like reviews and inspections. They also plan to generalize the framework to specifications and explore its use in other quality assurance techniques.

Summary updated

BibTeX
@inproceedings{pretschner2013generic,
  author = {Alexander Pretschner and Dominik Holling and Robert Eschbach and Matthias Gemmar},
  title = {{A Generic Fault Model for Quality Assurance}},
  booktitle = {Models},
  year = {2013},
  doi = {10.1007/978-3-642-41533-3\_6},
}

Loading related content...

Figure