Berend De Boer - How you should use Behat for website testing - DrupalSouth 2017 - Loft
In this talk we'll discuss how Drupal programmers actually should use Behat. The original idea behind Behaviour Driven Development is that non-programmers, customers, could read tests. But too often Behat scripts read like programs: click here, click there, check for this, that kind of thing. So how do we write scenarios that read like the customer wrote it?
This talk is targeted at programmers as it takes some technical expertise to write readable Behat programs. We'll discuss how to pass variables and settings to your tests using behat.yml, how to write your own features, and how to provide your own modules with features. But we'll keep focused on the main goal: how do we write a feature that reads like a customer would write it, and will understand it? And how do we write features that do not easily break when the website changes?
Some knowledge of Behat would be helpful, not essential. A basic understanding of Drupal and PHP is assumed.
This talk is targeted at programmers as it takes some technical expertise to write readable Behat programs. We'll discuss how to pass variables and settings to your tests using behat.yml, how to write your own features, and how to provide your own modules with features. But we'll keep focused on the main goal: how do we write a feature that reads like a customer would write it, and will understand it? And how do we write features that do not easily break when the website changes?
Some knowledge of Behat would be helpful, not essential. A basic understanding of Drupal and PHP is assumed.