1.1. State of the union: writing better tests

Today, it’s widely recommended that developers write automated tests that fail the build when there are regressions. Furthermore, an increasing number of professionals is leaning on a test-first style of programming, using automated tests not for protecting against regression but for aiding them in design, specifying the behavior they expect from code before writing that code, thereby validating a design before verifying its implementation.

Being a consultant, I get to see a lot of teams, organizations, products, and code bases. Looking at where we are today, it’s clear that automated tests have made their way into the mainstream. This is good because without such automated tests, most software projects ...

Get Effective Unit Testing 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.