МЕТОД ФОРМУВАННЯ ТЕСТОВИХ СЦЕНАРІЇВ ДЛЯ БІБЛІОТЕК ПРОГРАМНОГО ЗАБЕЗПЕЧЕННЯ, ЯКЕ НАПИСАНО НА МОВІ ПРОГРАМУВАННЯ C++ НА ОСНОВІ Q-LEARNING АГЕНТА
DOI:
https://doi.org/10.36074/grail-of-science.19.09.2025.041Keywords:
метод, агент, тестовий сценарій, тестовий набір, бібліотека, програмне забезпечення, мова програмування, алгоритм, база даних, інструмент, додаток, ресурс, даніSummary
В статті запропоновано метод формування тестових сценаріїв для бібліотек програмного забезпечення, яке написано на мові програмування C++ на основі Q-learning агента. Метод показує високу адаптивність та ефективність у формуванні релевантних сценаріїв, а також потенціал до масштабування на нові програмні бібліотеки. Використання Q-learning у поєднанні з динамічним дослідженням API дозволяє уникнути залежності від формальних специфікацій. Метод реалізовано у складі інструмента CIDER та апробовано на двох open-source C++ бібліотеках з різними типами API. Сформовані агентом сценарії мають кращі характеристики порівняно з початковими – меншу довжину та вищу щільність покриття.
Downloads
Downloads
License
Copyright (c) 2025 Олексій Коломійцев, Михайло Гулевич, Дмитро Меленті, Євген Поринос, Валерій Каменецький, Микола Костащук, Віктор Сапон, Володимир Сургай, Віктор Кушнір, Сергій Рязанцев, Леонід Хроль, Володимир Салогор
References
Pan, R.; Bagherzadeh, M.; Ghaleb, T.A.; Briand, L. Test Case Selection and Prioritization Using Machine Learning: A Systematic Literature Review. Empir. Softw. Eng. 2022, 27, 29. DOI: https://doi.org/10.1007/s10664-021-10066-6
Mehmood, A.; Ilyas, Q.M.; Ahmad, M.; Shi, Z. Test Suite Optimization Using Machine Learning Techniques: A Comprehensive Study. IEEE Access 2024, 12, 168645-168671. DOI: https://doi.org/10.1109/ACCESS.2024.3490453
Yoo, S.; Harman, M. Regression Testing Minimization, Selection and Prioritization: A Survey. Software Testing, Verification and Reliability 2012, 22, 67-120. DOI: https://doi.org/10.1002/stvr.430
Cruciani, E.; Miranda, B.; Verdecchia, R.; Bertolino, A. Scalable Approaches for Test Suite Reduction. In Proceedings of the 41st International Conference on Software Engineering (ICSE), Montreal, QC, Canada, 25-31 May 2019; pp. 419-429. DOI: https://doi.org/10.1109/ICSE.2019.00055
Zeller, A.; Hildebrandt, R. Simplifying and Isolating Failure-Inducing Input. IEEE Trans. Softw. Eng. 2002, 28, 183-200. DOI: https://doi.org/10.1109/32.988498
Ju, X.; Jiang, S.; Chen, X.; Wang, X.; Zhang, Y.; Cao, H. HSFal: Effective Fault Localization Using Hybrid Spectrum of Full Slices and Execution Slices. J. Syst. Softw. 2014, 90, 3-17. [CrossRef] DOI: https://doi.org/10.1016/j.jss.2013.11.1109
Palak; Gulia, P.; Gill, N.S. An Enhanced Artificial Bee Colony: Naïve Bayes Technique for Optimizing Software Testing. Int. J. Adv. Comput. Sci. Appl. 2021, 12, 2, 220-225. DOI: https://doi.org/10.14569/IJACSA.2021.0120228
Darabseh, R.J.; Ahmad, A.; Saifan, S. Detecting Redundant Test Cases Using Deep Learning. J. Theor. Appl. Inf. Technol. 2024, 102, 5021-5032.
Nagy, S.M.; Maghawry, H.A.; Badr, N.L. An Enhanced Approach for Test Suite Reduction Using Clustering and Genetic Algorithms. J. Theor. Appl. Inf. Technol. 2023, 101, 4287-4299. Available online: http://www.jatit.org/volumes/Vol101No11/15Vol101No11.pdf (accessed on 24 June 2025).
Tahvili, S.; Hatvani, L.; Felderer, M.; Afzal, W.; Bohlin, M. Automated Functional Dependency Detection Between Test Cases Using Doc2Vec and Clustering. Proceedings of the 2019 IEEE International Conference On Artificial Intelligence Testing (AITest), Newark, CA, USA, 2019; pp. 19-26. DOI: https://doi.org/10.1109/AITest.2019.00-13
Waqar, M.; Imran; Zaman, M.; Muzammal, M.; Kim, J. Test Suite Prioritization Based on Optimization Approach Using Reinforcement Learning. Appl. Sci. 2022, 12, 6772. DOI: https://doi.org/10.3390/app12136772
Bagherzadeh, M.; Kahani, N.; Briand, L. Reinforcement Learning for Test Case Prioritization. IEEE Trans. Softw. Eng. 2022, 48, 2836-2856. DOI: https://doi.org/10.1109/TSE.2021.3070549
Zhang, Z.; Cui, B.; Chen, C. Reinforcement Learning-Based Fuzzing Technology. In Innovative Mobile and Internet Services in Ubiquitous Computing; Barolli, L., Poniszewska-Maranda, A., Park, H., Eds.; Advances in Intelligent Systems and Computing, Vol. 1195; Springer: Cham, Switzerland, 2021; pp. 217-226.
Pham, V.-T.; Böhme, M.; Roychoudhury, A. AFLNET: A Greybox Fuzzer for Network Protocols. In Proceedings of the 2020 IEEE 13th International Conference on Software Testing, Validation and Verification (ICST), Porto, Portugal, 2020; pp. 460-465. DOI: https://doi.org/10.1109/ICST46399.2020.00062
Rosenbauer, L.; Stein, A.; Pätzel, D.; Hähner, J. XCSF with Experience Replay for Automatic Test Case Prioritization. In Proceedings of the 2020 IEEE Symposium Series on Computational Intelligence (SSCI), Canberra, ACT, Australia, 1-4 December 2020; pp. 1307-1314. DOI: https://doi.org/10.1109/SSCI47803.2020.9308379
Sharif, A.; Marijan, D.; Liaaen, M. DeepOrder: Deep Learning for Test Case Prioritization in Continuous Integration Testing. In Proceedings of the 2021 IEEE International Conference on Software Maintenance and Evolution (ICSME), Luxembourg, 27 September - 1 October 2021; pp. 525-534. DOI: https://doi.org/10.1109/ICSME52107.2021.00053
Marijan, D.; Gotlieb, A.; Sapkota, A. Neural Network Classification for Improving Continuous Regression Testing. In Proceedings of the 2020 IEEE International Conference On Artificial Intelligence Testing (AITest), Oxford, UK, 25-27 May 2020; pp. 123-124. DOI: https://doi.org/10.1109/AITEST49225.2020.00025
Xiao, L.; Miao, H.; Shi, T.; Huang, Y. LSTM-Based Deep Learning for Spatial-Temporal Software Testing. Distrib. Parallel Databases 2020, 38, 687-712. DOI: https://doi.org/10.1007/s10619-020-07291-1
Saidani, I.; Ouni, A.; Mkaouer, M.W. Improving the Prediction of Continuous Integration Build Failures Using Deep Learning. Autom. Softw. Eng. 2022, 29, 21. DOI: https://doi.org/10.1007/s10515-021-00319-5
Joseph, A.K.; Radhamani, G. Hybrid Test Case Optimization Approach Using Genetic Algorithm with Adaptive Neuro-Fuzzy Inference System for Regression Testing. J. Test. Eval. 2017, 45, 2283-2293. DOI: https://doi.org/10.1520/JTE20160137
Samoaa, H. P.; Longa, A.; Mohamad, M.; Chehreghani, M. H.; Leitner, P. TEP-GNN: Accurate Execution Time Prediction of Functional Tests Using Graph Neural Networks. In Product-Focused Software Process Improvement; Taibi, D., Kuhrmann, M., Mikkonen, T., Klünder, J., Abrahamsson, P., Eds.; Lecture Notes in Computer Science, 13709; Springer: Cham, Switzerland, 2022; pp. 464-479. DOI: https://doi.org/10.1007/978-3-031-21388-5_32
Raamesh, L.; Jothi, S.; Radhika, S. Test Case Minimization and Prioritization for Regression Testing Using SBLA-Based AdaBoost Convolutional Neural Network. J. Supercomput. 2022, 78, 18379-18403. DOI: https://doi.org/10.1007/s11227-022-04540-1
Puterman, M.L. Markov Decision Processes: Discrete Stochastic Dynamic Programming; John Wiley & Sons: Hoboken, NJ, USA, 1994. DOI: https://doi.org/10.1002/9780470316887
Watkins, C.J.C.H.; Dayan, P. Q-learning. Mach. Learn. 1992, 8, 279-292. DOI: https://doi.org/10.1007/BF00992698
Sutton, R.S.; Barto, A.G. Reinforcement Learning: An Introduction, 2nd ed.; MIT Press: Cambridge, MA, USA, 2018.
Taylor, M.E.; Stone, P. Transfer Learning for Reinforcement Learning Domains: A Survey. J. Mach. Learn. Res. 2009, 10, 1633-1685.
Pan, S.J.; Yang, Q. A Survey on Transfer Learning. IEEE Trans. Knowl. Data Eng. 2010, 22, 1345-1359. DOI: https://doi.org/10.1109/TKDE.2009.191
Ćorović, A.; Ilić, V.; Ðurić, S.; Marijan, M.; Pavković, B. The Real-Time Detection of Traffic Participants Using YOLO Algorithm. In Proceedings of the 2018 26th Telecommunications Forum (TELFOR), Belgrade, Serbia, 20-21 November 2018; pp. 1-4. DOI: https://doi.org/10.1109/TELFOR.2018.8611986
Kaelbling, L.P.; Littman, M.L.; Moore, A.W. Reinforcement Learning: A Survey. J. Artif. Intell. Res. 1996, 4, 237-285. DOI: https://doi.org/10.1613/jair.301
Mnih, V.; Kavukcuoglu, K.; Silver, D.; Graves, A.; Antonoglou, I.; Wierstra, D.; Riedmiller, M. Human-Level Control through Deep Reinforcement Learning. Nature 2015, 518, 529-533. DOI: https://doi.org/10.1038/nature14236
Beazley, D.M. SWIG: An Easy to Use Tool for Integrating Scripting Languages with C and C++. In Proceedings of the 4th Annual Tcl/Tk Workshop, Monterey, CA, USA, 6-10 July 1996. Available online: https://www.swig.org/papers/Tcl96/tcl96.html (accessed on 24 June 2025).
Hulevych, M. CIDER: Assisted Automation Tool for C++ Libraries Testing. Cont., Navi. & Communication Sys., 2024, 2, 074. DOI: https://doi.org/10.26906/SUNZ.2024.2.074
Hunter, J.D. Matplotlib: A 2D Graphics Environment. Comput. Sci. Eng. 2007, 9, 90-95. DOI: https://doi.org/10.1109/MCSE.2007.55
Bellemare, M.G.; Dabney, W.; Munos, R. A Distributional Perspective on Reinforcement Learning. In Proceedings of the 34th International Conference on Machine Learning (ICML 2017), Sydney, Australia, 6-11 August 2017; pp. 449-458.
Коломійцев О.В., Гулевич М.В., Красношапка І.В., Коробецький О.В., Лернатович А.М., Бердочник А.Д., Чебаков О.М., Чемерис В.О., Шкорупський В.М., Чебакова О.Б., Воробйов О.Г. Особливості застосування методів автоматизованої генерації тестів для програмного забезпечення C++. ГРААЛЬ НАУКИ: міжнар. наук. журнал. – Вінниця: ГО «Європейська наукова платформа»; НУ «Інститут науково-технічної інтеграції та співпраці», 2025. – No 54. – С. 527-542. DOI 10.36074/grail-of-science.18.07.2025.
Коломійцев О.В., Гулевич М.В., Собора А.І., Лільчицький В.І., Коломієць Б.І., Харченко О.Л., Ясинський О.М., Богдан С.І., Коломієць В.В., Трифоненко К.Ю., Хроль Л.О., Шендрик В.І. Особливості застосування розробленого інструменту CIDER для автоматизації тестування бібліотек програмного забезпечення, яке написано на мові програмування C++. ГРААЛЬ НАУКИ: міжнар. наук. журнал. – Вінниця: ГО «Європейська наукова платформа»; НУ «Інститут науково-технічної інтеграції та співпраці», 2025. – No 55. – С. 476-488. – DOI 10.36074/grail-of-science.22.08.2025.
Semenov, S.; Kolomiitsev, O.; Hulevych, M.; Mazurek, P.; Chernyk, O. An Intelligent Method for C++ Test Case Synthesis Based on a Q-Learning Agent. Appl. Sci. 2025, 15, 8596. https://doi.org/10.3390/app15158596. DOI: https://doi.org/10.3390/app15158596
Downloads
How to Cite
Issue
Section
Categories