Graph Neural Network and Reinforcement Learning Framework for Test Case Prioritization, Selection, and Reduction
PDF

How to Cite

S., Sowmyadevi, and Shashi Mehrotra. 2026. “Graph Neural Network and Reinforcement Learning Framework for Test Case Prioritization, Selection, and Reduction”. Journal of Trends in Computer Science and Smart Technology 8 (1): 130-54. https://doi.org/10.36548/jtcsst.2026.1.007.

Keywords

— Regression Testing
— Test Case Prioritization
— Test Suite Reduction
— Test Case Selection
— Graph Neural Networks
— Reinforcement Learning
— Search-Based Software Engineering
Published: 19-03-2026

Abstract

The process of regression testing is generally done under critical time and resource constraints. In the existing approaches, Test Case Prioritization (TCP), Test Case Selection (TCS), and Test Suite Reduction (TSR) have been treated as different optimization problems. This is based on simple heuristics that do not use valuable information that can be extracted from the program under test. Moreover, they do not allow for making internally consistent budget-conscious decisions. This paper introduces a unified approach that combines various variants of Graph Neural Networks (GNNs) and Reinforcement Learning (RL) for the solutions of TCP, TCS, and TSR. In our proposal, the representation of regression artifacts such as test cases, code entities, and faults is used as nodes in the typed graph, while the edges are used to show the relations between these artifacts. The relation-aware GNN is used for generating test case embeddings, reflecting the distance between the test cases and the changed areas as well as the areas known to have issues in the past. The actor-critic RL agent uses these test case embeddings and the budget to decide whether to run, skip, or discard test cases. The performance of our proposal outstrips coverage-based heuristics, history-based ranking, a GA-based search, an enhanced QPSO, and two learning-based ablations, as validated by our experiments on four Java projects from Defects4J.  In terms of various programs and budgets, using GNN–RL has led to an improvement in the Average Percentage of Faults Detected (APFD) and Cost-cognizant Average Percentage of Faults Detected (APFDc) by approximately 6–9 percentage points on lower budgets. In addition, it is possible to obtain a 42% suite reduction and a 48% cost reduction while still retaining 98% of all fault-revealing tests in the final suite. The results show that it is possible to obtain promising solutions for adaptive regression testing using budget-aware reinforcement learning and graph-based representation learning.

References

  1. Lima, Jackson A. Prado, and Silvia R. Vergilio. "Test Case Prioritization in Continuous Integration Environments: A Systematic Mapping Study." Information and software technology 121 (2020): 106268.
  2. Raamesh, Lilly, S. Jothi, and S. Radhika. "Test Case Minimization and Prioritization for Regression Testing Using SBLA-Based Adaboost Convolutional Neural Network." The Journal of Supercomputing 78, no. 16 (2022): 18379-18403.
  3. Greca, Renan, Breno Miranda, and Antonia Bertolino. "State of Practical Applicability of Regression Testing Research: A Live Systematic Literature Review." ACM Computing Surveys 55, no. 13s (2023): 1-36.
  4. Singhal, Shweta, Nishtha Jatana, Bharti Suri, Sanjay Misra, and Luis Fernandez-Sanz. "Systematic Literature Review on Test Case Selection and Prioritization: A Tertiary Study." Applied Sciences 11, no. 24 (2021): 12121.
  5. Yaraghi, Ahmadreza Saboor, Mojtaba Bagherzadeh, Nafiseh Kahani, and Lionel C. Briand. "Scalable and Accurate Test Case Prioritization in Continuous Integration Contexts." IEEE Transactions on Software Engineering 49, no. 4 (2022): 1615-1639.
  6. Jung, Pilsu, Sungwon Kang, and Jihyun Lee. "Efficient Regression Testing of Software Product Lines by Reducing Redundant Test Executions." Applied Sciences 10, no. 23 (2020): 8686.
  7. Mukherjee, Rajendrani, and K. Sridhar Patnaik. "A Survey on Different Approaches for Software Test Case Prioritization." Journal of King Saud University-Computer and Information Sciences 33, no. 9 (2021): 1041-1054.
  8. Habib, Amir Sohail, Saif Ur Rehman Khan, and Ebubeogu Amarachukwu Felix. "A Systematic Review on Search‐Based Test Suite Reduction: State‐of‐the‐Art, Taxonomy, And Future Directions." IET Software 17, no. 2 (2023): 93-136.
  9. Raju, Sekar Kidambi, Sathiamoorthy Gopalan, S. K. Towfek, Arunkumar Sukumar, Doaa Sami Khafaga, Hend K. Alkahtani, and Tahani Jaser Alahmadi. "Test Case Selection Through Novel Methodologies for Software Application Developments." Symmetry 15, no. 10 (2023): 1959.
  10. Chi, Jianlei, Yu Qu, Qinghua Zheng, Zijiang Yang, Wuxia Jin, Di Cui, and Ting Liu. "Relation-Based Test Case Prioritization for Regression Testing." Journal of Systems and Software 163 (2020): 110539.
  11. Khoshnevis, Sedigheh, and Omid Ardestani. "Search-Based Approaches to Optimizing Software Product Line Architectures: A Systematic Literature Review." Information and Software Technology 170 (2024): 107446.
  12. Yang, Bin, Huilai Li, Ying Xing, Fuping Zeng, Chengdong Qian, Youzhi Shen, and Jiongbo Wang. "Directed Search Based on Improved Whale Optimization Algorithm for Test Case Prioritization." International Journal of Computers Communications & Control 18, no. 2 (2023).
  13. Bajaj, Anu, Ajith Abraham, Saroj Ratnoo, and Lubna Abdelkareim Gabralla. "Test Case Prioritization, Selection, and Reduction Using Improved Quantum-Behaved Particle Swarm Optimization." Sensors 22, no. 12 (2022): 4374.
  14. Pan, Rongqi, Mojtaba Bagherzadeh, Taher A. Ghaleb, and Lionel Briand. "Test Case Selection and Prioritization Using Machine Learning: A Systematic Literature Review." Empirical Software Engineering 27, no. 2 (2022): 29.
  15. Durelli, Vinicius HS, Rafael S. Durelli, Simone S. Borges, Andre T. Endo, Marcelo M. Eler, Diego RC Dias, and Marcelo P. Guimarães. "Machine Learning Applied to Software Testing: A Systematic Mapping Study." IEEE Transactions on Reliability 68, no. 3 (2019): 1189-1212.
  16. Shankar, Ramakrihnan, and Devarajan Sridhar. "An Improved Deep Learning Based Test Case Prioritization Using Deep Reinforcement Learning." International Journal of Intelligent Engineering & Systems 17, no. 1 (2024).
  17. Qian, Zhongsheng, Qingyuan Yu, Hui Zhu, Jinping Liu, and Tingfeng Fu. "Reinforcement Learning for Test Case Prioritization Based on Lleed K-Means Clustering and Dynamic Priority Factor." Information and Software Technology 179 (2025): 107654.
  18. Bagherzadeh, Mojtaba, Nafiseh Kahani, and Lionel Briand. "Reinforcement Learning for Test Case Prioritization." IEEE Transactions on Software Engineering 48, no. 8 (2021): 2836-2856.
  19. Le, Triet HM, Hao Chen, and Muhammad Ali Babar. "Deep Learning for Source Code Modeling and Generation: Models, Applications, and Challenges." ACM Computing Surveys (CSUR) 53, no. 3 (2020): 1-38.
  20. Samoaa, Hazem Peter, Firas Bayram, Pasquale Salza, and Philipp Leitner. "A Systematic Mapping Study of Source Code Representation for Deep Learning in Software Engineering." IET Software 16, no. 4 (2022): 351-385.
  21. Barchi, Francesco, Emanuele Parisi, Andrea Bartolini, and Andrea Acquaviva. "Deep Learning Approaches to Source Code Analysis for Optimization of Heterogeneous Systems: Recent Results, Challenges and Opportunities." Journal of Low Power Electronics and Applications 12, no. 3 (2022): 37.
  22. Zhou, Jie, Ganqu Cui, Shengding Hu, Zhengyan Zhang, Cheng Yang, Zhiyuan Liu, Lifeng Wang, Changcheng Li, and Maosong Sun. "Graph Neural Networks: A Review of Methods and Applications." AI open 1 (2020): 57-81.
  23. Maarleveld, Jesse, Jiapan Guo, and Daniel Feitosa. "A Systematic Mapping Study on Graph Machine Learning for Static Source Code Analysis." Information and Software Technology 183 (2025): 107722.
  24. Sutton, Richard S., and Andrew G. Barto. Reinforcement Learning: An Introduction. Vol. 1, no. 1. Cambridge: MIT press, 1998.