Testing

Let’s assume that your development process includes test-first (or test-driven) development and that you have, therefore, an automated test framework and an extensive body of unit tests in place already. It’s now, when you’re about to start making changes to the source, that this approach really pays off. Not only can you use it to ensure that your fix addresses the problem, but it also provides an invaluable safeguard against regressions.

Start by ensuring that all your tests pass.

Because you’re going to rely on the tests so heavily, start by ensuring that they all pass (which should certainly be the case because you’ve just ensured that you’re working on a clean source tree). If they don’t all pass, stop immediately, and determine ...

Get Debug It! 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.