Behavior Driven Development: Behat and Drupal for acceptance tests
Behavior Driven Development: Behat and Drupal for acceptance tests
Ricardo Sanz
Behavior Driven Development (BDD) is a software development process that originates from TDD (Test Driven Development). The main idea is based on how the software must be understood from both technical and business points of view, focused on its value to the user through User Stories.
BDD employs Acceptance Tests written in natural language using a set of predefined steps that are automatically translated into executable tests. This allows developers and product owners to agree on User Stories, eliminating ambiguity and ensuring that everyone is on the same page when it comes to requirements.
In the Drupal world, BDD is implemented using Behat, a PHP BDD tool. Behat can simulate or use a real browser to access a site as a visitor, editor, or any other role, and confirm that the User Stories are working as expected.
In this workshop, you'll learn the practical basics of Behat, including how to add tests, expand the available steps, and use BDD strategies to cover your site's functionality. By the end of the workshop, you'll have a solid understanding of how to use Behat to deliver high-quality software that meets your users' needs.
Requirements:
Bring a computer with Git, Docker, Docker Compose (v1), and 'make' installed for exercises.
Workshop (2x45 minutes)
Experience level of the audience
Intermediate