testing

Testing Drupal distributions using Behat, Mink, Drupal Extension, and Travis CI

The problem

Imagine never having to click around your website after a site update, worrying that something may have broken. Imagine never getting a call from a client after a site update, telling you that something in fact has broken.

What if instead you could script all the actions that you would normally do by clicking and have those automatically run each time you push new code to your code repository?

All this is possible using Behat, Mink, Drupal Extension, and Travis CI.

This past week I've spent some time creating a proof of concept test suite for a Drupal distribution. I began with the Drupal 7 standard install profile. This will be a walkthrough of the additions I made to add testing to the distribution.

The code

Follow along with the code in my [Classic] GitHub repository.

The tools

Behat

Behat is a PHP framework for [Behaviour Driven Development] (BDD).

Avoiding inadvertent emails while developing with Reroute Email module

Reroute Email module is an extra safeguard for anyone who's worried about inadvertently sending out emails to users while testing/developing.

Drupal SimpleTest Module Abridged

This post is part of our Abridged series, which aims to explain the basics of some of the more ominous yet awesome Drupal projects in simple and practical terms. We hope these posts will help demystify some of these projects for people who have been hesitant to try them out!

AB learning simpletest from Rok

Here, we'll take a look at the SimpleTest module/framework, including a review of its history within the Drupal project, the current state of the module, how to start using it, resources, and a note on how we've been using it ourselves. HUGE thanks to Drupal SimpleTest co-maintainer Rok Zlender for teaching us about using SimpleTest when he was in Vancouver last summer - the code samples are care of Rok's example custom test.

Syndicate content