Chapter 10. BDD and unit testing

This chapter covers

  • The relationship between BDD, TDD, and unit testing
  • Going from automated acceptance criteria to implemented features
  • Using BDD to discover design and explore low-level requirements
  • Tools that help you write BDD unit tests more effectively

So far we’ve focused on Behavior-Driven Development (BDD) as a tool for discovering, illustrating, and verifying business requirements. But BDD doesn’t stop at the business requirements level, or once you’ve automated your acceptance tests. In this chapter you’ll learn how BDD principles and tools can help you write better-designed and better-tested application code (see figure 10.1).

Figure 10.1. In this chapter we’ll focus on using BDD practices ...

Get BDD in Action: Behavior-Driven Development for the whole software lifecycle now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.