CHAPTER 2

image

Unit Testing and Test Driven Development

Theory

Unit testing refers to being able to repeatedly and reliably test a piece of software – a “unit” - for proper functionality. These tests occur at the developer level to ensure that code written for some desired functionality behaves as expected. By ensuring that each “unit” passes the test(s) that it was designed for, the developer can ensure that as the code is integrated into larger and more complex systems each piece of software remains valid.

Unlike earlier testing strategies, these tests are usually part of the project being tested and can be automated. Getting into the mindset of ...

Get Practical Software Development Techniques: Tools and Techniques for Building Enterprise Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.