Generating source code templates on the basis of unit tests

1Citations
Citations of this article
5Readers
Mendeley users who have this article in their library.
Get full text

Abstract

This paper describes the solution for supporting Test-driven development (TDD) methodology with the help of code analysis and generation. By automation of the creation of stub implementation, it helps to accelerate the process of passing a red phase of Red/Green/Refactor (RDR) cycle. The tool described in the paper performs a semantic analysis of the test methods defined in a subjected Java class. It uses the information gathered during a process for further generation of unit stubs. The proposed solution describes the way in which the Abstract Syntax Tree (AST) is analyzed by the statements tree decomposition. The paper also presents possible ways of preventing and resolving unit types conflicts. The tool used for stub generation of units was defined in one of the test methods implemented in a Log4J Java framework. The results obtained are compared to a real class definition, and possible ways for further extensions of the solution are suggested.

Cite

CITATION STYLE

APA

Nyznar, M., & Pałka, D. (2017). Generating source code templates on the basis of unit tests. Advances in Intelligent Systems and Computing, 522, 213–223. https://doi.org/10.1007/978-3-319-46586-9_17

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free