O'Reilly logo

Beyond Legacy Code by David Scott Bernstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Write Good Tests

Most developers I’ve met assume they know what a good test is and how to write one, but in my experience few developers really understand how to write good unit tests. As with most things, these are skills that have to be learned.

Many managers—and developers—have strange notions about what TDD really is. Much of that confusion stems from how they talk about TDD. There are many different ways of doing test-driven development and I’m a proponent of test-first development, where developers write a test for a small bit of functionality and then make the test pass by implementing that small bit of functionality. It’s the ping-ponging back and forth between taking the perspective of your test (outside-in) and taking the perspective ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required