In this session you’ll learn about Test-Driven Development (TDD), Approval Testing, and how using them can help you deliver better code in less time.
TDD is a great way to ensure your code meets the business requirements and is easy for other developers to understand and modify. Writing automated tests before you write the associated production code, and refactoring both the test and production code once the test passes, is a key part of TDD. So if you’re working on a project that is in production (or has lots of production code) but no automated tests, TDD can’t help much — but that’s where Approval Testing shines.
Approval Testing compares the current behavior of existing code with it’s previously approved of behavior, and lets you know what (if anything) has changed. Instead of asserting that a number, or a simple string were returned, an approval test might compare a complex object with it’s approved version and let you know when things change.