Attention Transfer Reinforcement Learning for Test Case Prioritization in Continuous Integration
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...
Saved in:
| Main Authors: | , , , , , |
|---|---|
| Format: | Article |
| Language: | English |
| Published: |
MDPI AG
2025-02-01
|
| Series: | Applied Sciences |
| Subjects: | |
| Online Access: | https://www.mdpi.com/2076-3417/15/4/2243 |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| Summary: | 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. |
|---|---|
| ISSN: | 2076-3417 |