7 From executable specifications to automated acceptance tests
This chapter covers
- The basic principles of automating your scenario steps
- The responsibilities of a step definition method
- Implementing step definitions using Cucumber in Java and TypeScript
- Setting up virtual environments for your tests
Over the previous few chapters, you’ve seen how the BDD lifecycle takes acceptance criteria and turns them into executable specifications. Acceptance criteria start as brief notes you write on the back of your story cards that help define when a story or feature is complete. During three-amigo sessions or other requirements discovery workshops, these notes are fleshed out into more complete examples and counter-examples that illustrate business rules and objectives. And as we saw in the previous chapter, you can write more complete versions of these acceptance criteria in the form of Gherkin scenarios, using the Given… When… Then notation[35].