Content area
Testing is a crucial step in software engineering process, in order to achieve safe, error-free code. Novel advancements were accomplished by the scientific community to enhance the testing experience, especially for the automatic test generation process, improving the performance of the tools for those kind of tasks. Nevertheless, in cases it is needed to handle with complex data, several automatic test generation tools, especially EvoSuite, still faces some challenges.
This thesis investigates methods to improve the effectiveness of unit tests generated by EvoSuite, with a particular focus on Java classes for audio processing. The study identifies a limitation in EvoSuite’s ability to generate complex inputs beyond simple primitives, hindering its coverage of certain cases. To address this, a novel tool, Pool++, was developed to extend EvoSuite by creating and injecting mocks with randomized data, enabling broader and deeper test coverage.
The tool’s impact was evaluated along three dimensions: the impact on code coverage, the mock generation’s overhead produced, and the test execution’s detain generated. Experiments on two classes from the SF110 dataset demonstrated significant increases in line coverage, reaching 81% and 97%, as well as for branch coverage, reaching 55% and 88% of the classes’ branches. Although Pool++ introduces execution overhead due to the generation and integration of mocks, it does not cause substantial output delay and retains comparable test execution times.
Scalability analyses suggest that Pool++ can continue to yield coverage benefits for larger and more complex classes, with a slight increase in production overhead when additional mocks are required. Overall, the proposed approach effectively enhances EvoSuite’s capability to test complex audio processing scenarios, contributing to the automatic generation of higher-quality test suites and supporting the development of safer and more robust software systems.