Behat & BDD: "Deploying better software with confidence" - meet John Bickar




Acquia Inc. podcasts show

Summary: While speaking with Melissa Anderson about behavior driven development (BDD) at BADCamp 2014, she suggested I get John Bickar from Stanford Web Services in front of my cameras to talk about his experience during last year's "Drupalgeddon" security vulnerability. The result is this podcast and some great insight into how this kind of testing can significantly improve initial, ongoing, and emergency delivery of software. As John puts it, using BDD means: "delivering better software, delivering it faster, and knowing that it is delivering the value that we have promised to our partners." I would have named this episode of the Acquia Podcast more in the spirit of Dr. Strangelove: "Behat tests mean death to Linky-Clicky or how BDD helped Stanford Web Services recover fast during Drupalgeddon," but reason won out. We also touch on the changing nature of digital needs and access in education in the last few years and how that affects how and what gets delivered through digital channels. Note: Funny camera angles! – I recorded this interview the very first day I had my new, 2-camera setup. I was doing some guessing, especially on the 2nd one, which hasn't got a monitor screen, so in the end, let's say the angles are "interesting" :-) What is Stanford Web Services? "Stanford Web Services is an in-house Drupal development shop. We do Drupal site builds for partners on campus. We're also an infrastructure and hosting organization. We run a software-as-a-service [SaaS] platform that we call Stanford Sites. It runs mostly Drupal 7; we started it in Drupal 6. And we maintain this self-service website building platform for anyone at the campus to use for free. We also make much of our code available for free to the campus community and the wider Drupal community," including a responsive theme, and several features and modules. What is Behavior Driven Development? "Behavior Driven Development [BDD] is a process by which you define your user stories and your business values based on what a user of the website wants to get done and why it matters to them. BDD then allows you to write those steps down, in plain English and you can then use that to build towards "complete". So when those use scenarios and those features are complete and testable, then you know that you are finished." The creators of behat ("an open source behavior-driven development framework for PHP 5.3 and 5.4"), describe it thus: "It’s the idea that you start by writing human-readable sentences that describe a feature of your application and how it should work, and only then implement this behavior in software." Thinking one step further, once your site is in production, behat tests help you prevent functionality-regressions in future releases, too. Build towards agreed-upon business value with BDD John and Stanford Web Services started using BDD and Behat "as a way to do functional testing, but we've really started to adapt the BDD part because it allows us to get everyone involved in writing the user stories and in creating and agreeing on the business value. And then the developers, we know what we're building towards." "We care about delivering websites that work to our clients. We care about partnering with the various stakeholders on campus and delivering cutting-edge communications. That means it always need to be up, it needs to deliver the information that they need. BDD is a way that we can meet that in a rapid and accurate manner." "There are a number of ways that we use BDD to deliver better software. We use tools that are part of the BDD toolkit to ensure stability when we make changes to code. So at heart, the function of what I do is that I am a software developer, but no one cares about the code that I write ... and I can't blame them. They care about whether or not they can do the things that they came to a website to do. When we push out code updates, we use tools like behat and Mink [...