Advantage Actor-Critic-based Test Case Prioritization for Early Detection of Operational Defects in AI Services

Eko Agustina, Lulu Chaerani Munggaran

Abstract


API-based artificial intelligence (AI) services may experience semantic defects and runtime failures under high-load conditions, necessitating test case prioritization strategies that support the early detection of operational defects. This study aims to evaluate the effectiveness of adaptive test case prioritization using Advantage Actor-Critic (A2C) for AI services under high-load conditions. The experiments were conducted using intent classification services based on DistilBERT and ELECTRA-small, with a test suite derived from Banking77. A2C was compared with random prioritization and performance-based prioritization using full test suite prioritization over ten cycles and five runs, yielding 300 experimental units. Effectiveness was evaluated using Average Percentage of Faults Detected (APFD), Test to First Failure (TTF), and response time. For DistilBERT, A2C achieved the highest mean APFD of 0.883816 and the lowest TTF of 1.000. For ELECTRA-small, A2C achieved the highest mean APFD of 0.674268, with a TTF of 1.000, identical to that of performance-based prioritization. Performance-based prioritization yielded the lowest response times for both models: 3,760.845 ms for DistilBERT and 5,984.625 ms for ELECTRA-small. The Friedman tests indicated statistically significant differences across the three metrics for both models ([test statistics and p-values to be inserted]). Wilcoxon signed-rank tests with Holm correction showed that most method pairs differed significantly. Exceptions included TTF for A2C versus performance-based prioritization on ELECTRA-small, which produced identical results, and response time for A2C versus random prioritization, which did not differ significantly. These findings indicate that A2C's primary advantage lies in its ability to generate effective test case prioritization sequences for earlier operational defect detection rather than achieving the lowest response time.

Keywords


high-load testing; operational defect; reinforcement learning; software testing; test case prioritization

Full Text:

PDF

References


Y. X. Tang, Z. L. Ren, H. Jiang, X. C. Li, and W. Q. Kong, “An Empirical Comparison Between Tutorials and Crowd Documentation of Application Programming Interface,” J. Comput. Sci. Technol., Vol. 36, No. 4, pp. 856–876, Jul. 2021, DOI: 10.1007/s11390-020-0042-0.

G. Giray, “The Pre-Print of the A Software Engineering Perspective on Engineering Machine Learning Systems: State of the Art and Challenges,” 2021. [Online]. Available: https://conferences.oreilly.com/software-architecture/sa-eu-

S. Herbold and T. Haar, “Smoke Testing for Machine Learning: Simple Tests to Discover Severe Bugs,” Empir. Softw. Eng., Vol. 27, No. 2, Mar. 2022, DOI: 10.1007/s10664-021-10073-7.

M. H. Moghadam, M. Saadatmand, M. Borg, M. Bohlin, and B. Lisper, “An Autonomous Performance Testing Framework using Self-Adaptive Fuzzy Reinforcement Learning,” Software Quality Journal, Vol. 30, No. 1, pp. 127–159, Mar. 2022, DOI: 10.1007/s11219-020-09532-z.

G. Bercaru, C. O. Truică, C. G. Chiru, and T. Rebedea, “Improving Intent Classification using Unlabeled Data from Large Corpora,” Mathematics, Vol. 11, No. 3, Feb. 2023, DOI: 10.3390/math11030769.

M. Bagherzadeh, N. Kahani, and L. Briand, “Reinforcement Learning for Test Case Prioritization,” Mar. 2021, [Online]. Available: http://arxiv.org/abs/2011.01834

C. Laaber, H. C. Gall, and P. Leitner, “Applying Test Case Prioritization to Software Microbenchmarks,” Empir. Softw. Eng., Vol. 26, No. 6, Nov. 2021, DOI: 10.1007/s10664-021-10037-x.

A. S. Yaraghi, M. Bagherzadeh, N. Kahani, and L. Briand, “Scalable and Accurate Test Case Prioritization in Continuous Integration Contexts,” Apr. 2022, DOI: 10.1109/TSE.2022.3184842.

P. S. N. Mindom, A. Nikanjam, and F. Khomh, “A Comparison of Reinforcement Learning Frameworks for Software Testing Tasks,” Jun. 2023, [Online]. Available: http://arxiv.org/abs/2208.12136

Q. Su, X. Li, Y. Ren, R. Qiu, C. Hu, and Y. Yin, “Attention Transfer Reinforcement Learning for Test Case Prioritization in Continuous Integration,” Applied Sciences (Switzerland), Vol. 15, No. 4, Feb. 2025, DOI: 10.3390/app15042243.

Y. Yang, C. Pan, Z. Li, and R. Zhao, “Adaptive Reward Computation in Reinforcement Learning-Based Continuous Integration Testing,” IEEE Access, Vol. 9, pp. 36674–36688, 2021, DOI: 10.1109/ACCESS.2021.3063232.

N. A. Alrakban, M. Alrashoud, and M. Abdullah-Al-Wadud, “Optimizing Test Case Prioritization with Meta Deep Reinforcement Learning in Continuous Integration,” IEEE Access, Vol. 13, pp. 172435–172455, 2025, DOI: 10.1109/ACCESS.2025.3617387.

S. Śmigiel, “ECG Classification using Orthogonal Matching Pursuit and Machine Learning,” Sensors, Vol. 22, No. 13, Jul. 2022, DOI: 10.3390/s22134960.

Y. Niu and S. S. Chai, “Design and Optimization of a Test Case Generation Algorithm for Real-Time Embedded Systems based on adaptive Q-Learning,” Automated Software Engineering, Vol. 33, No. 2, Dec. 2026, DOI: 10.1007/s10515-026-00598-w.

A. Jayanetti, S. Halgamuge, and R. Buyya, “Deep Reinforcement Learning for Energy and Time Optimized Scheduling of Precedence-Constrained Tasks in Edge–Cloud Computing Environments,” Future Generation Computer Systems, Vol. 137, pp. 14–30, Dec. 2022, DOI: 10.1016/j.future.2022.06.012.

Z. Wang, M. Goudarzi, M. Gong, and R. Buyya, “Deep Reinforcement Learning-based Scheduling for Optimizing System Load and Response Time in Edge and Fog Computing Environments,” Future Generation Computer Systems, Vol. 152, pp. 55–69, Mar. 2024, DOI: 10.1016/j.future.2023.10.012.

L. Giamattei, A. Guerriero, R. Pietrantuono, and S. Russo, “Automated Functional and Robustness Testing of Microservice Architectures,” Journal of Systems and Software, Vol. 207, Jan. 2024, DOI: 10.1016/j.jss.2023.111857.




DOI: https://doi.org/10.32520/stmsi.v15i10.6872

Article Metrics

Abstract view : 0 times
PDF - 0 times

Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.