3-5 July 2006
CERN, Geneva
Europe/Zurich timezone

An Introduction to Test Driven Code Generation

4 Jul 2006, 09:00
40-SS-D01 (CERN, Geneva)


CERN, Geneva

Refereed Papers Refereed Papers


Dr Raphael Marvie (LIFL -- University of Lille)


Agile Software Development promotes the use of techniques such as Test Driven Development (TDD) and Automation in order to improve software quality and to reduce development time. Code generation represents a way to achieve automation, reducing repetitive and error-prone tasks. Code generation is well accepted, writing a code generator is not necessary that hard, however it is not trivial to decide when and how to embrace code generation. Moreover, it is even harder to embrace at the same time code generation and TDD, wondering for example "How to test drive generated code?" or "How to build a generator following a test driven approach?" This paper aims at providing hints to answer those questions. It presents an iterative approach named Test Driven Code Generation. The main principle is to gain knowledge about the application during the first iterations of its development process and then to identify how to implement code generation. As code generation should not drive you out of TDD, we provide hints to marry both approaches in order to empower your developments. Using a simple 3-tier web application, this paper is illustrated with the Python standard unittest module, CherryPy web application server and Cheetah templating system.


A first working draft is available for the referees at:


It still needs improvement.

Primary author

Dr Raphael Marvie (LIFL -- University of Lille)

Presentation Materials

Your browser is out of date!

Update your browser to view this website correctly. Update my browser now