May 2012 Portland Drupal Meetup

Monday, May 14, 2012 - 10:40

The May Portland Drupal meetup kicked off with a round of introductions and some brief sharing about cool things attendees are doing with Drupal. More than a few people mentioned working on Apache Solr integration and Drupal Commerce. Others mentioned helping with the upgrade to Drupal 7 (the site currently runs on Drupal 6). Part of the upgrade process has been a shift to Behavior Driven Development (BDD). Melissa and Jonathan have been contributing to that effort and presented on BDD. Many developers are familiar with Test-driven Development and BDD is an extension of that and a response to its perceived problems. One common complaint about Test-driven Development is that the unit tests, or granular pieces of functionality, can often drive the larger test and lead to overall tests that are misguided. BDD focuses on the end user behavior so that the overall test can drive smaller unit tests. To do this, BDD starts with a "feature" that explains a basic business or functional need in a single, structured sentence. A basic example of a feature is: "In order to read this blog post, as a visitor to the OpenSourcery website, you need to view this page." Following the feature is a "scenario" presented in a "Given," "When," "Then" format. Given that you are on the OpenSourcery website homepage, when you click the Blog link and click the "May 2012 Portland Drupal Meetup" link, then you will see the "May 2012 Portland Drupal Meetup" page. Since the behavior is first defined in the feature, it's easy to see how you could have multiple scenarios to accomplish the feature (e.g. clicking a link from the Blog's RSS feed or from the Drupal Planet). has adopted Behat, a popular and growing BDD framework for PHP. Once you have a scenario written, Behat will generate a scaffold of test code based on your scenario. You can then fill in the scaffold with your actual test code. You can find more information about the BDD work on by visiting the Doobie project. There's also a Behat project that you can use to apply BDD to your own site. Information about BDD and where it fits into current Drupal testing was presented by Moshe Weitzman at DrupalCon Denver. Following the presentation, the meetup broke into smaller groups and began writing features and contributing them in the Doobie issue queue, so that others could continue working to write scenarios and tests. Feeling productive from our feature contributions, we headed over to The Lucky Lab Beer Hall for food, drinks and continued discussions. More information about future Portland area meetups (including the newly formed Drupal Front End meetup and DrupalCon Portland volunteer meetings) can be found on the Portland Drupal Groups page.

Add Your Comment Here

Jason Yee
OpenSourcery Alum