17

Writing Your First Cucumber Test

Test-driven development is primarily a process for developers. Sometimes, customers and product owners want to see the results of automated tests too. Unfortunately, the humble unit test that is the foundation of TDD is simply too low-level to be helpful to non-developers. That’s where the idea of Behavior Driven Development (BDD) comes in.

BDD tests have a few characteristics that set them apart from the unit tests you’ve seen so far:

  • They are end-to-end tests that operate across the entire system.
  • They are written in natural language rather than code, which is understandable by non-coders and coders alike.
  • They avoid making references to internal mechanics, instead focusing on the outward behavior of the ...

Get Mastering React Test-Driven Development - Second Edition 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.