An Environment Adaptation Agent of Reinforcement Learning in Continuous Integration Test Case Prioritization
Continuous Integration (CI) is a fundamental practice in modern software development. It enables early fault detection through regression testing, where Test Case Prioritization (TCP) plays a crucial role in improving detection efficiency. Reinforcement Learning-based TCP (RL-TCP) has shown promise in CI scenarios, but its performance often fluctuates due to CI’s dynamic nature. Existing solutions address this by assigning additional rewards or periodically retraining agents. However, these methods either risk over-adjusting strategies due to excessive reliance on additional rewards or fail to respond promptly to changes due to fixed retraining intervals. We propose a novel Environment Adaptation Agent-based RL-TCP method (EAA) that addresses these challenges through a dual mechanism. EAA detects significant environmental changes by analyzing fluctuations in prioritization effectiveness. When a change is detected, it assigns targeted rewards to test cases. EAA also refines the agent’s gradient update so that environmental dynamics are better incorporated into retraining. This enables agents to swiftly adapt while retaining learned prioritization knowledge. Evaluations on 12 real-world industrial datasets show that EAA improves the NAPFD metric by 4.7–24.79% and reduces the average TTF by 35.85–50.37 positions compared to state-of-the-art RL-TCP methods. Additionally, EAA significantly reduces occurrences of NAPFD equal to zero, effectively mitigating prioritization instability.
Authors
- Sheng Xu (ORCID: https://orcid.org/0000-0001-8816-4779)
- H. M. Liu (ORCID: https://orcid.org/0009-0000-7582-5734)
- Yong Liu (ORCID: https://orcid.org/0000-0003-1754-3039)
- Jiping Liu (ORCID: https://orcid.org/0000-0001-9275-3250)
- Li Zheng (ORCID: https://orcid.org/0009-0007-9478-414X)
Institutions
- Beijing University of Chemical Technology (CN)
Publication Details
- Journal
- International Journal of Software Engineering and Knowledge Engineering
- Published
- 2025-10-14
- DOI
- https://doi.org/10.1142/s0218194025500792
- Primary Topic
- Software Reliability and Analysis Research
- Type
- article
- Field-Weighted Citation Impact
- 0.00