O'Reilly logo

The Cucumber Book, 2nd Edition by Steve Tooke, Aslak Hellesoy, Matt Wynne

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

Adding New Behavior

When you think about it, the process of adding new behavior to a system isn’t so different from fixing a bug. The overall goal is to change some aspect of how the system behaves, without breaking anything else.

Just as with bug fixing, we can use characterization tests to pin down the surrounding behavior of the system to be sure it isn’t dislodged by our work. Characterization tests can also be useful before that, while the new feature is first being considered. You can use them to understand how much work is involved in the new feature by clarifying exactly what the system currently does.

Here’s our recipe for adding new behavior to a legacy system:

  1. Examine the new feature. If necessary, write a few characterization ...

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