Approval Testing: When it's too late for Test-Driven Development

Track: Agile
Approval Testing may seem odd compared to Test-Driven Development, but it’s designed to let you write automated tests when you already have a large codebase (that may already be in production) and/or the business requirements are out of date, incomplete, or completely missing. While this may sound crazy, it’s something most programmers have had to deal with. The Good News is that Approval Testing evolved as a solution for just this kind of problem. It makes the reasonable assumption that the current behavior of production code is correct, and compares it with how the system behaves after you’ve made some changes. If the results are identical then the test passes; if not, then it shows you the differences so you can decide whether the changes are correct or not. With Approval Tests in place, you can safely refactor the existing production code, then start introducing Test-Driven Development when adding new features to the system.
Burk Hufnagel
Burk is a long-time programmer and software architect, with experience in multiple languages including JavaScript and Java. He’s presented at multiple conferences including ConnectTech, DevNexus, JavaOne, and Oracle Code One, and contributed to three of the “97 Things” books published by O’Reilly. Burk works as a Solution Architect for Daugherty Business Solutions where he's focused on finding ways to deliver better code in less time, and teaching others how to do the same.