In this edition of the Puppet Podcast, hosts Kara and Kent sat down with Gareth Rushgrove, Puppet Labs software engineer, to talk about Test Driven Development (TDD). This podcast is especially helpful to those who are new to TDD: the process of writing tests first, then writing enough code to pass the test and finally refactoring the code to make it better.
Gareth shares how he uses Test Driven Development and why he’s found it a compelling way to write code. He says, “Tests help you move quickly and not break functionality.” He encourages those new to TDD to jump in and write their first test. He explains,“Writing the first test is the hardest, but once you’ve gotten one test in, you can replicate that to different modules very easily.”
Gareth recommends reading the code of modules that have test suites, such as garethr-docker and other Puppet Approved modules and to join the puppet-users mailing list if you’re just starting out writing tests. Be sure to check out the Learn More s