CSC 4110 Lecture Notes - Lecture 25: Kent Beck, Motion Picture Production Code, No Code
Document Summary
The goal is to produce working clean code that fulfills requirements. Write a failing (automated) test before writing production code. Make a minimal change to production code to fix the failing test. When there are enough tests, re-factor the code. No, it will reduce testing efforts and decrease bugs. No, tdd is about design and development: writing testcases are sometimes difficult. If your test are becoming complex, may be you should review your design: how does tdd help. Tdd helps you produce clean working code that fulfills requirements: write test code. Tdd basics - unit testing: red, green, refactor, make it fail. No code without a failing test: make it work. As simply as possible: make it better. Ensure the functional code is tangible: write functional code. The code written is only designed to pass the test no further (and therefore untested code is not created): refactor. Delete unnecessary code: benefits, confidence in change.