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

Вантажиться...
Ескіз

Дата

Науковий ступінь

Рівень дисертації

Шифр та назва спеціальності

Рада захисту

Установа захисту

Науковий керівник/консультант

Члени комітету

Назва журналу

Номер ISSN

Назва тому

Видавець

MDPI

Анотація

Ensuring 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.

Опис

Ключові слова

C++, test suite minimization, test case synthesis, reinforcement learning, Q-learning, Q-table, dynamic environment, code coverage

Бібліографічний опис

An 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).

Підтвердження

Рецензія

Додано до

Згадується в