O'Reilly logo

The Cucumber for Java Book by Seb Rose, Matt Wynne, Aslak Hellesoy

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

What Sort of Tests?

Both BDD and TDD ask us to write examples before we write the code to help us drive out just the functionality that our customers want, and no more. When we write these scenarios and tests, they guide our emerging design. Once the functionality has been implemented, their purpose is to give us confidence when we refactor or add new behavior to protect us from regressions.

Many people assume that when using a tool like Cucumber—where the test is a business-readable acceptance test—we must exercise all layers of the solution. That’s not the case! The choice between using a natural language tool or a more technical tool, such as JUnit, to run the tests depends on who is interested in reading the specification. How much of ...

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