Postprint version. Published in Proceedings of the 37th SIGCSE Technical Symposium on Computer Science Education, March 1, 2006, pages 254-258.
Copyright © ACM, 2006. This is the author's version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in Proceedings of the 37th SIGCSE Technical Symposium on Computer Science Education
NOTE: At the time of publication, the author David Janzen was not yet affiliated with Cal Poly.
The definitive version is available at http://dx.doi.org/10.1145/1121341.1121419.
Test-driven learning (TDL) is an approach to teaching computer programming that involves introducing and exploring new concepts through automated unit tests. TDL offers the potential of teaching testing for free, of improving programmer comprehension and ability, and of improving software quality both in terms of design quality and reduced defect density.This paper introduces test-driven learning as a pedagogical tool. It will provide examples of how TDL can be incorporated at multiple levels in computer science and software engineering curriculum for beginning through professional programmers. In addition, the relationships between TDL and test-driven development will be explored.Initial evidence indicates that TDL can improve student comprehension of new concepts while improving their testing skills with no additional instruction time. In addition, by learning to construct programs in a test-driven manner, students are expected to be more likely to develop their own code with a test-driven approach, likely resulting in improved software designs and quality.