Towards Statistical Prioritization for Software Product Lines Testing

Xavier Devroey, Maxime Cordy, Gilles Perrouin, Pierre-Yves Schobbens, Axel Legay, Patrick Heymans · DOI

Abstract: Testing Software Product Lines (SPLs) is notoriously difficult due to the combinatorial explosion of possible feature combinations. This paper introduces a novel approach that prioritizes which products to test by combining statistical usage models (Markov chains) with behavioral models (Featured Transition Systems). By focusing on the most (or least) probable execution traces, engineers can target their testing efforts on the behaviors that users actually trigger in the real world.

Introduction

Software Product Line (SPL) engineering allows developers to build a family of software products by mixing and matching reusable features. However, testing an SPL is a massive challenge: a system with $N$ features can yield up to $2^N$ distinct products. Traditional sampling techniques, such as pairwise testing, select a subset of products based on static Feature Diagrams but often ignore how the software behaves and how frequently specific behaviors occur in practice. This paper addresses this gap by proposing a "family-based" prioritization method that ranks products based on the statistical probability of their actual execution behaviors.

Methodology

The proposed approach integrates three distinct modeling paradigms to bridge the gap between static feature selection and dynamic behavior.

The proposed three-step workflow for statistical prioritization.
  1. Feature Diagram (FD): Represents the valid combinations of features.
  2. Featured Transition System (FTS): A compact behavioral model of the entire SPL, where transitions are tagged with the specific features required to execute them.
  3. Discrete Time Markov Chain (DTMC): A statistical usage model where transitions between states are assigned probabilities based on real-world usage or operational profiles.

The core algorithm follows a three-step process:

  • Trace Selection: A Depth First Search (DFS) extracts finite sequences of actions (traces) from the DTMC that meet specific probability bounds and length constraints.
  • Filtering and FTS' Building: Extracted traces are validated against the FTS. This step filters out "illegal" traces that might exist in partial usage logs but are impossible in the actual SPL. The result is a pruned FTS (FTS') containing only valid, targeted behaviors.
  • Product Prioritization: Valid traces are mapped back to the specific products capable of executing them. Products are then prioritized based on the cumulative probability of the traces they support.

Case Study and Results

The authors illustrate the methodology using a standard SPL benchmark: a Soda Vending Machine.

The three core models used in the vending machine case study: (a) Feature Diagram, (b) Featured Transition System, and (c) Usage Model (DTMC).

In this example, which comprises 32 valid products, the trace selection algorithm successfully extracted finite traces based on user-defined bounds. The filtering step identified inconsistent behaviors, such as traces mixing "pay" and "free" machine logic—an impossible scenario in the actual product line. For a specific behavior—paying for and serving tea—the method isolated the 8 products capable of the action and calculated an exact execution probability of 0.009.

Discussion and Conclusion

A key insight of this work is the deliberate separation of the usage model from the behavioral model. This allows the DTMC to be built from incomplete logs while the FTS maintains the system's ground truth. By generating probable behaviors first and then identifying supporting products (a bottom-up approach), the method maximizes test reuse across the product family.

However, the current DFS-based trace extraction is susceptible to state-space explosion. Future research will explore symbolic execution and automated DTMC inference from system logs to improve scalability and practical applicability in complex, real-world SPLs.

Summary updated

BibTeX
@inproceedings{devroey2013towards,
  author = {Xavier Devroey and Maxime Cordy and Gilles Perrouin and Pierre-Yves Schobbens and Axel Legay and Patrick Heymans},
  title = {{Towards Statistical Prioritization for Software Product Lines Testing}},
  booktitle = {VaMoS},
  year = {2013},
  doi = {10.1145/2556624.2556635},
}
Figure