Automated Test Generation from Program Documentation Encoded in Code Comments
Documenting the functionality of software units with code comments, e.g., Javadoc comments, is a common programmer best-practice in software engineering. This paper introduces a novel test generation technique that exploits the code-comment documentation constructively. We originally address those behaviors as test objectives, which we pursue in search-based fashion. We deliver test cases with names and oracles properly contextualized on the target behaviors. Our experiments against a benchmark of 118 Java classes indicate that the proposed approach successfully tests many software behaviors that may remain untested with coverage-driven test generation approaches, and distinctively detects unknown failures.
Authors
- Giovanni Denaro (ORCID: https://orcid.org/0000-0002-7566-8051)
- Luca Gugliemo
Institutions
- University of Milano-Bicocca (IT)
Publication Details
- Published
- 2025-04-28
- DOI
- https://doi.org/10.1109/ast66626.2025.00012
- Primary Topic
- Software Testing and Debugging Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00