Description
Behat is seemingly everywhere these days in the Drupal community, and you know you want to use this on your next website project. Everyone is on board, except for the business owner (or whomever may be authorizing the features in the product). Or you need to convince just simply someone that this is not a waste of time and will contribute to the website's success. Behat testing makes the most sense for the sites that will be around a long time, such as education, government, or your favorite large organization. If you are working on this sort of site, anywhere in its lifetime, then the testing strategies discussed here will help you determine how to get the most out of your behat tests.
Just simply agreeing that you need BDD is not enough, you need to ask additional questions such as:
- Who should be doing the testing?
- What users do we want to be testing? (Admin, content admins, anonymous?)
- What should I test?
- Feature selection
- Key system settings
- Where should I test?
- * Overview of appropriate places in the development stack.
- How should I test it?
- Overview of situations that call for a just HTML inspection versus using a full browser.
- What resources are available for learning and integrating Behat?
- Where to get online help and starter kits
- When do I know I'm doing too much testing?
- It's never too much!
- In all seriousness, not everything can be tested. We will talk about determining what's appropriate and what's overkill.
Finally, a few Real-World Examples!
Every skill starts small -- this is how you will build your BDD testing capability to facilitate faster and stable development!
Jason Partyka
Princeton UniversityHaving worked with Drupal since 2008, I do many development and administration Drupal activities, from custom coding to devops and administration.