Summary
In this chapter, we defined and explained what BDD is and why we need it. By implementing BDD, we will be able to develop our solutions better to properly address the actual business goal. We can start defining these business goals using features and scenarios, written in the Gherkin language, which is just plain English. By doing so, different people from different teams in the company will be able to coordinate and understand each other better in defining the system’s intended behavior. This will help bridge the gap and language barrier between different teams.
We created a feature and a scenario, then used Behat, Mink, and Goutte to define the intended system behavior, open a headless browser, visit the web application, and verify the content of the home page.
This is just the tip of the BDD iceberg. In the next chapter, we will start writing solution code while making sure that our code is maintainable and testable by using BDD and TDD together.