Attention Transfer Reinforcement Learning for Test Case Prioritization in Continuous Integration
Source abstract
Abstract
Continuous integration (CI), a crucial technology for accelerating software delivery, employs prioritization methods to optimize testing efficiency. Reinforcement-learning-based prioritization techniques of test cases can dynamically adjust the prioritization strategy based on test feedback. However, existing reinforcement learning models either use feature information from individual test cases or the complete feature of all test cases as input. The model’s input is fixed and does not vary based on the characteristics of the test case set. This leads to the model’s inability to handle various ranking scenarios in CI. In this paper, we propose a novel Attention Transfer Reinforcement Learning for Test Case Prioritization (ATRL-TCP) method. ATRL-TCP first leverages the richness of historical information and error rates to assess the test case set. It then determines whether the model’s input should be the feature information of a single test case or the relative order between them. This method allows for the shifting of focus based on the dataset characteristics. We validate the method on four industrial datasets and examine the impact of historical information length and error rate on its performance. The results demonstrate that ATRL-TCP has good generalization ability and achieves good ranking performance within an acceptable time.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Engineering and Test Systems · Software Reliability and Analysis Research · Software Testing and Debugging Techniques
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
School of Computer Science and Engineering, Beihang University, Haidian, Beijing 100191, China
School of Software, Beihang University, Haidian, Beijing 100191, China
Funding
National Key R&D Program
References (30)
Show source-provided references
1. Ramírez, A., Berrios, M., Romero, J.R., and Feldt, R. (2023, January 16–20). Towards Explainable Test Case Prioritisation with Learning-to-Rank Models. Proceedings of the 2023 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW), Dublin, Ireland.10.1109/ICSTW58534.2023.00023 ↗
2. Kumar, S., and Yadav, M. (2023). Finite State GUI Testing with Test Case Prioritization Using Z-BES and GK-GRU. Appl. Sci., 13.10.3390/app131910569 ↗
3. Fowler, M., and Foemmel, M. (2025, February 15). Continuous integration. Available online: https://tinyurl.com/ycbl2uhj.
4. Regression test case prioritization by code combinations coverage10.1016/j.jss.2020.110712 ↗
5. Relation-based test case prioritization for regression testing10.1016/j.jss.2020.110539 ↗
6. Chen, J., Lou, Y., Zhang, L., Zhou, J., Wang, X., Hao, D., and Zhang, L. (2018, January 4–9). Optimizing test prioritization via test distribution analysis. Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, Lake Buena Vista, FL, USA.10.1145/3236024.3236053 ↗
7. Zhao, Y.F., Hao, D., and Zhang, L. (2023, January 1–6). Revisiting Machine Learning based Test Case Prioritization for Continuous Integration. Proceedings of the 2023 IEEE International Conference on Software Maintenance and Evolution (ICSME), Bogota, Colombia.10.1109/ICSME58846.2023.00032 ↗
8. Test case selection and prioritization using machine learning: A systematic literature review10.1007/s10664-021-10066-6 ↗
9. Spieker, H., Gotlieb, A., Marijan, D., and Mossige, M. (2017, January 10–14). Reinforcement learning for automatic test case prioritization and selection in continuous integration. Proceedings of the 26th ACM SIGSOFT International Symposium on Software Testing and Analysis, Santa Barbara, CA, USA.10.1145/3092703.3092709 ↗
10. Test Case Prioritization Technique in Continuous Integration Based on Reinforcement Learning
11. Sharif, A., Marijan, D., and Liaaen, M. (October, January 27). Deeporder: Deep learning for test case prioritization in continuous integration testing. Proceedings of the 2021 IEEE International Conference on Software Maintenance and Evolution (ICSME), Luxembourg.10.1109/ICSME52107.2021.00053 ↗
12. Reward of reinforcement learning of test optimization for continuous integration
13. Rothermel, G., Untch, R.H., Chu, C., and Harrold, M.J. (September, January 30). Test case prioritization: An empirical study. Proceedings of the IEEE International Conference on Software Maintenance—1999 (ICSM’99). ’Software Maintenance for Business Change’ (Cat. No.99CB36360), Oxford, UK.10.1109/ICSM.1999.792604 ↗
14. Mossige, M., Gotlieb, A., Spieker, H., Meling, H., and Carlsson, M. (September, January 28). Time-aware test case execution scheduling for cyber-physical systems. Proceedings of the Principles and Practice of Constraint Programming: 23rd International Conference, CP 2017, Melbourne, VIC, Australia. Proceedings 23.10.1007/978-3-319-66158-2_25 ↗
15. Henard, C., Papadakis, M., Harman, M., Jia, Y., and Le Traon, Y. (2016, January 14–22). Comparing white-box and black-box test prioritization. Proceedings of the 38th International Conference on Software Engineering, Austin, TX, USA.10.1145/2884781.2884791 ↗
16. Zhang, L.M., Hao, D., Zhang, L., Rothermel, G., and Mei, H. (2013, January 18–26). Bridging the gap between the total and additional test-case prioritization strategies. Proceedings of the 2013 35th International Conference on Software Engineering (ICSE), San Francisco, CA, USA.10.1109/ICSE.2013.6606565 ↗
17. A unified test case prioritization approach10.1145/2685614 ↗
18. Habtemariam, G.M., and Mohapatra, S.K. (2019, January 28–30). A genetic algorithm-based approach for test case prioritization. Proceedings of the Information and Communication Technology for Development for Africa: Second International Conference, ICT4DA 2019, Bahir Dar, Ethiopia. Revised Selected Papers 2, 2019.
19. Parallel test prioritization
20. Some seeds are strong: Seeding strategies for search-based test case selection10.1145/3532182 ↗
21. Yi, P., Wang, H., Xie, T., Marinov, D., and Lam, W. (2022, January 2–7). A Theoretical Analysis of Random Regression Test Prioritization. Proceedings of the International Conference on Tools and Algorithms for the Construction and Analysis of Systems, Munich, Germany.10.1007/978-3-030-99527-0_12 ↗
22. Colosseum: Regression Test Prioritization by Delta Displacement in Test Coverage10.1109/TSE.2021.3111169 ↗
23. Liu, Y., Zhang, J.Y., Nie, P.Y., Gligoric, M., and Legunsen, O. (2023, January 17–21). More precise regression test selection via reasoning about semantics-modifying changes. Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis, Seattle, WA, USA.10.1145/3597926.3598086 ↗
24. Busjaeger, B., and Xie, T. (2016, January 13–18). Learning for test prioritization: An industrial case study. Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering, Seattle, WA, USA.10.1145/2950290.2983954 ↗
25. Mamata, R., Azim, A., Liscano, R., Smith, K., Chang, Y.-K., Seferi, G., and Tauseef, Q. (2023, January 15–16). Test case prioritization using transfer learning in continuous integration environments. Proceedings of the 2023 IEEE/ACM International Conference on Automation of Software Test (AST), Melbourne, Australia.10.1109/AST58925.2023.00023 ↗
26. Bertolino, A., Guerriero, A., Miranda, B., Pietrantuono, R., and Russo, S. (2020, January 5–11). Learning-to-rank vs. ranking-to-learn: Strategies for regression testing in continuous integration. Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering, Seoul, Republic of Korea.10.1145/3377811.3380369 ↗
27. Cluster-based adaptive test case prioritization
28. Exploiting DBSCAN and Combination Strategy to Prioritize the Test Suite in Regression Testing10.1049/2024/9942959 ↗
29. A systematic study of reward for reinforcement learning based continuous integration testing10.1016/j.jss.2020.110787 ↗
30. (2025, February 01). Apach Drill Dataset. Available online: https://github.com/suqingran777/ATRL-TCP.