An Intelligent Method for C++ Test Case Synthesis Based on a Q-Learning Agent

dc.contributor.authorSemenov, Serhii
dc.contributor.authorKolomiitsev, Oleksii
dc.contributor.authorHulevych, Mykhailo
dc.contributor.authorMazurek, Patryk
dc.contributor.authorChernykh, Olena
dc.date.accessioned2025-12-19T07:14:43Z
dc.date.issued2025
dc.description.abstractEnsuring software quality during development requires effective regression testing. However, test suites in open-source libraries often grow large, redundant, and difficult to maintain. Most traditional test suite optimization methods treat test cases as atomic units, without analyzing the utility of individual instructions. This paper presents an intelligent method for test case synthesis using a Q-learning agent. The agent learns to construct compact test cases by interacting with an execution environment and receives rewards based on branch coverage improvements and simultaneous reductions in test case length. The training process includes a pretraining phase that transfers knowledge from the original test suite, followed by adaptive learning episodes on individual test cases. As a result, the method requires no formal documentation or API specifications and uses only execution traces of the original test cases. An explicit synthesis algorithm constructs new test cases by selecting API calls from a learned policy encoded in a Q-table. Experiments were conducted on two open-source C++ libraries of differing API complexity and original test suite size. The results show that the proposed method can reach up to 67% test suite reduction while preserving branch coverage, confirming its effectiveness for regression test suite minimization in resource-constrained or specification-limited environments.
dc.identifier.citationAn Intelligent Method for C++ Test Case Synthesis Based on a Q-Learning Agent [Electronic resource] / Serhii Semenov, Oleksii Kolomiitsev, Mykhailo Hulevych [et al.] // Applied Sciences. – Electronic text data. – 2025. – № 15 (17), 8596. – 31 p. – URL: https://www.mdpi.com/2076-3417/15/15/8596, free (accessed 19.12.2025).
dc.identifier.doihttps://doi.org/10.3390/app15158596
dc.identifier.orcidhttps://orcid.org/0000-0003-4472-9234
dc.identifier.orcidhttps://orcid.org/0000-0001-8228-8404
dc.identifier.orcidhttps://orcid.org/0009-0003-8622-3271
dc.identifier.orcidhttps://orcid.org/0000-0001-9625-2971
dc.identifier.orcidhttps://orcid.org/0000-0002-4389-2446
dc.identifier.urihttps://repository.kpi.kharkov.ua/handle/KhPI-Press/96511
dc.language.isoen
dc.publisherMDPI
dc.subjectC++
dc.subjecttest suite minimization
dc.subjecttest case synthesis
dc.subjectreinforcement learning
dc.subjectQ-learning
dc.subjectQ-table
dc.subjectdynamic environment
dc.subjectcode coverage
dc.titleAn Intelligent Method for C++ Test Case Synthesis Based on a Q-Learning Agent
dc.typeArticle

Файли

Контейнер файлів

Зараз показуємо 1 - 1 з 1
Вантажиться...
Ескіз
Назва:
AS_2025_15_Semenov_An_Intelligent.pdf
Розмір:
3.38 MB
Формат:
Adobe Portable Document Format

Ліцензійна угода

Зараз показуємо 1 - 1 з 1
Вантажиться...
Ескіз
Назва:
license.txt
Розмір:
11.25 KB
Формат:
Item-specific license agreed upon to submission
Опис: