This document discusses test-driven development (TDD) using JUnit. It explains the philosophy of TDD, which is to write tests before writing code by beginning with the test in mind. The TDD process is then outlined as writing a test, running it and seeing it fail, stubbing the routine, running it again and seeing it fail, writing the code, and running it to see it pass. JUnit is introduced as a tool for TDD in Java that uses annotations to identify test methods. Mocking is also briefly discussed as allowing for better and faster testing by integrating different systems and simplifying designs to find bugs faster. Finally, the document suggests looking at a live example of how TDD can improve code
Related topics: