Rethinking Basis Path Testing: Mixed Integer Programming Approach for Test Path Set Generation
By: Chao Wei , Xinyi Peng , Yawen Yan and more
Potential Business Impact:
Finds the best test paths for computer programs.
Basis path testing is a cornerstone of structural testing, yet traditional automated methods, relying on greedy graph-traversal algorithms (e.g., DFS/BFS), often generate sub-optimal paths. This structural inferiority is not a trivial issue; it directly impedes downstream testing activities by complicating automated test data generation and increasing the cognitive load for human engineers. This paper reframes basis path generation from a procedural search task into a declarative optimization problem. We introduce a Mixed Integer Programming (MIP) framework designed to produce a complete basis path set that is globally optimal in its structural simplicity. Our framework includes two complementary strategies: a Holistic MIP model that guarantees a theoretically optimal path set, and a scalable Incremental MIP strategy for large, complex topologies. The incremental approach features a multi-objective function that prioritizes path simplicity and incorporates a novelty penalty to maximize the successful generation of linearly independent paths. Empirical evaluations on both real-code and large-scale synthetic Control Flow Graphs demonstrate that our Incremental MIP strategy achieves a 100\% success rate in generating complete basis sets, while remaining computationally efficient. Our work provides a foundational method for generating a high-quality structural "scaffold" that can enhance the efficiency and effectiveness of subsequent test generation efforts.
Similar Papers
Improving Directions in Mixed Integer Bilevel Linear Optimization
Optimization and Control
Helps computers solve tricky two-level math problems.
Efficient Path Planning and Task Allocation Algorithm for Boolean Specifications
Robotics
Helps many robots work together safely and fast.
ID-PaS : Identity-Aware Predict-and-Search for General Mixed-Integer Linear Programs
Artificial Intelligence
Helps computers solve harder problems faster.