TUnit - Unit Testing For Template-based Code Generators
Carsten Kolassa, Markus Look, Klaus M\"uller, Alexander Roth, and Dirk Rei{\ss}, Bernhard Rumpe

TL;DR
This paper introduces TUnit, a JUnit-based approach for testing parts of template-based code generators, enabling early-stage testing and easier validation of code generator robustness.
Contribution
It presents a novel method for partial testing of template-based code generators using mocked environments, filling a gap in early development testing tools.
Findings
Supports partial testing with mocked environments
Enables early detection of issues in code generator templates
Provides multiple methods for validating generated code
Abstract
Template-based code generator development as part of model-drivendevelopment (MDD) demands for strong mechanisms and tools that support developers to improve robustness, i.e., the desired code is generated for the specified inputs. Although different testing methods have been proposed,a method for testing only parts of template-based code generators that can be employed in the early stage of development is lacking. Thus, in this paper we present an approach and an implementation based on JUnit to test template-based code generators. Rather than testing a complete code generator,it facilitates partial testing by supporting the execution of templates with a mocked environment. This eases testing of code generators in early stages of development as well as testing new orchanged parts of a code generator. To test the source code generated by the templates under test, different methods are…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsModel-Driven Software Engineering Techniques · Advanced Software Engineering Methodologies · Distributed and Parallel Computing Systems
