Applying the BDD principles
The best way to ensure that we write good Feature
s is to adhere to certain principles that will help us avoid mistakes and increase the quality of our Feature
s. In this section, we will examine the four major mental models to help us write concise, descriptive, and well-scoped Feature
s. Let's start at understanding that BDD is not about testing.
BDD isn't testing
BDD is about collaboration and shared understanding. By writing our features using a structured and ubiquitous language that can be understood by all stakeholders, we provide clarity and transparency. We allow and invite non-technical stakeholders to get involved in specifying our system's behavior. We make sure we all sing from the same hymn sheet, and that hymn sheet is our features, that is, our specifications. Yes, we also provide executable step definitions so that we can verify that our delivered code works as described in our features. But do not make the mistake of confusing...