# Reinforcement Learning for Automatic Test Case Prioritization and Selection in Continuous Integration

arXiv: https://arxiv.org/abs/1811.04122 · HTML: https://mlsanity.com/paper/1811.04122/

## Key facts

- Cited by 17 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 9 Nov 2018.

## Built on by (most cited first, 17 of 17)

- [BAFFLE: Hiding Backdoors in Offline Reinforcement Learning Datasets](https://mlsanity.com/paper/2210.04688/) (2022)
- [DeepOrder: Deep Learning for Test Case Prioritization in Continuous Integration Testing](https://mlsanity.com/paper/2110.07443/) (2021)
- [Systematic Literature Review on Application of Learning-based Approaches in Continuous Integration](https://mlsanity.com/paper/2406.19765/) (2024)
- [TEP-GNN: Accurate Execution Time Prediction of Functional Tests using Graph Neural Networks](https://mlsanity.com/paper/2208.11947/) (2022)
- [A Comparison of Reinforcement Learning Frameworks for Software Testing Tasks](https://mlsanity.com/paper/2208.12136/) (2022)
- [A Taxonomy of Information Attributes for Test Case Prioritisation: Applicability, Machine Learning](https://mlsanity.com/paper/2201.06044/) (2022)
- [Systematic Literature Review on Application of Machine Learning in Continuous Integration](https://mlsanity.com/paper/2305.12695/) (2023)
- [Artificial Intelligence in Software Testing : Impact, Problems, Challenges and Prospect](https://mlsanity.com/paper/2201.05371/) (2022)
- [GUI Test Migration via Abstraction and Concretization](https://mlsanity.com/paper/2409.05028/) (2024)
- [Reinforcement Learning for Automated Cybersecurity Penetration Testing](https://mlsanity.com/paper/2507.02969/) (2025)
- [Targeted Test Selection Approach in Continuous Integration](https://mlsanity.com/paper/2509.10279/) (2025)
- [Machine Learning Techniques for Software Quality Assurance: A Survey](https://mlsanity.com/paper/2104.14056/) (2021)
- [Reinforcement Learning for Dynamic Workflow Optimization in CI/CD Pipelines](https://mlsanity.com/paper/2601.11647/) (2026)
- [Test Case Prioritization: A Snowballing Literature Review and TCPFramework with Approach Combinators](https://mlsanity.com/paper/2603.00183/) (2026)
- [AINTMA: Agentic AI Architecture for Autonomous Test Management with Generative Intelligence, Secure Cloud Communication and Adaptive Quality Analytics](https://mlsanity.com/paper/2607.20452/) (2026)
- [Trajectory-Aware Benchmark Subset Selection for Cost-Efficient Software Engineering Agent Regression Testing](https://mlsanity.com/paper/2609.24928/) (2026)
- [FastCI: Efficient GPU-Intensive CI for LLM Training Frameworks](https://mlsanity.com/paper/2610.01967/) (2026)

## Abstract (arXiv)

Testing in Continuous Integration (CI) involves test case prioritization, selection, and execution at each cycle. Selecting the most promising test cases to detect bugs is hard if there are uncertainties on the impact of committed code changes or, if traceability links between code and tests are not available. This paper introduces Retecs, a new method for automatically learning test case selection and prioritization in CI with the goal to minimize the round-trip time between code commits and developer feedback on failed test cases. The Retecs method uses reinforcement learning to select and prioritize test cases according to their duration, previous last execution and failure history. In a constantly changing environment, where new test cases are created and obsolete test cases are deleted, the Retecs method learns to prioritize error-prone test cases higher under guidance of a reward function and by observing previous CI cycles. By applying Retecs on data extracted from three industrial case studies, we show for the first time that reinforcement learning enables fruitful automatic adaptive test case selection and prioritization in CI and regression testing.
