Rethinking Basis Path Testing: Mixed Integer Programming Approach for Test Path Set Generation

📅 2026-01-09
🏛️ arXiv.org
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the limitations of traditional basis path testing methods, which rely on graph traversal and often yield suboptimal path structures that hinder test data generation efficiency and increase human comprehension costs. For the first time, the generation of basis paths is formulated as a global optimization problem. The authors propose holistic and incremental solution strategies based on mixed-integer programming (MIP) that simultaneously ensure the completeness of the path set and optimize structural simplicity. A novelty penalty mechanism is introduced to enhance the success rate of generating linearly independent paths. Experimental results demonstrate that the approach achieves 100% complete basis path set generation on both real-world programs and large-scale synthetic control flow graphs, effectively balancing optimality and scalability, thereby providing high-quality structural scaffolds for automated testing.

Technology Category

Application Category

📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

basis path testing
structural testing
test path generation
control flow graph
path optimization
Innovation

Methods, ideas, or system contributions that make the work stand out.

Mixed Integer Programming
Basis Path Testing
Control Flow Graph
Test Path Generation
Structural Testing
X
Xinyi Peng
School of Computer Science and Artificial Intelligence, Hubei University of Technology, Wuhan 430068, China
Y
Yawen Yan
School of Computer Science and Artificial Intelligence, Hubei University of Technology, Wuhan 430068, China
M
Mao Luo
School of Computer Science and Artificial Intelligence, Hubei University of Technology, Wuhan 430068, China
Ting Cai
Ting Cai
University of Wisconsin-Madison
Machine LearningData Science