Josh McAdams: Practical Test-driven Development

Test-driven Development is one of the current buzzwords of programming and while many people have trouble subscribing to the philosophy, even more have trouble actually implementing it in their day-to-day work. It is just too easy to cut a testing corner here or write this little untested subroutine there. What seems like it is saving you time at the moment, might actually be costing you time and increasing your technical debt in the long term.

This tutorial briefly covers some conceptual testing discussion, but quickly moves into examples of test-driven development. The language used for the examples is Perl, though the practices and tools can be applied to other programming languages.

We’ll take an idea for a program, write a base-level test, make that test pass, write another failing test… over and over again until the final product is built. Then we’ll move into gathering and understanding code coverage for the tests that were just written and writing more tests for edge cases.

This tutorial is based on a course conducted by Stonehenge. Slides for the course can be provided upon request.