ICSE 2025
Sat 26 April - Sun 4 May 2025 Ottawa, Ontario, Canada

Automatic test generation aims to save developers time and effort by producing tests with optimized coverage. However, in search-based generation tools, the focus on coverage and mutation score leaves test quality properties coincidental, and evidence shows that developers care on the quality and understandability of tests and are currently skeptical of using generated tests. Generated tests do not follow a defined pattern while evolving, which can result in various main methods being tested or assertions not clearly related to the tests. Previous studies remark on the importance of structure and focal methods in understanding the relationship between source code and test code. These studies address this problem using post-processing techniques, but are inherently limited by the functioning of generation tools. In this proposal, our aim is to structure the generated tests following the Arrange, Act, Assert (AAA) pattern and the single-responsibility principle by construction. Our hypothesis is that improving these structural properties will improve the quality and understandability of the generated tests without affecting their effectiveness. This can benefit the development and research community by providing a novel implementation and actionable recommendations to improve the generated tests and promote their adoption in industry.