Stability-Aware Reinforcement Learning for Robust Class Integration Test Order Generation
Abstract
Class integration test order (CITO) generation is essential for reducing the overhead of test stub construction—the primary cost in integration testing—and for ensuring system reliability in complex software systems. While reinforcement learning (RL) has demonstrated potential in automating CITO generation, existing methods suffer from unstable policy learning and limited robustness against structural perturbations and defect injection. These challenges stem from insufficient reward shaping and the absence of reliable oracles for validation. To address these limitations, we propose LM-CITO, a stability-aware RL framework that integrates Lyapunov-guided reward shaping with semantic validation via metamorphic testing (MT). Specifically, we design a Lyapunov energy function over class dependency graphs to promote monotonic structural convergence during training, and define metamorphic relations (MRs) to verify behavioral consistency under controlled perturbations. Extensive experiments on six real-world systems demonstrate that LM-CITO consistently produces more effective policies, yielding CITOs with significantly reduced stubbing costs compared to baseline models. Furthermore, MT verifies the capability of our MRs to detect diverse defects across 19 injected bug variants, confirming LM-CITO’s robustness under varied fault-induced perturbations. These results highlight the synergy of stability guidance and MR-based validation, offering an effective, principled solution for oracle-free RL in software testing.
Fields of Study & Subjects
Software Testing and Debugging Techniques
Software Engineering Research
Software System Performance and Reliability
Publication details
- Journal / source
- Underline Science Inc.
- Publication date
- 7 January 2026
- Language
- EN