BDD With WebDriver and PageObjects



I've been trying to evangelise BDD (Behaviour Driven Development) at work over the past few months and I've had considerably more success than I thought.

So what is BDD?

BDD or Behaviour Driven Development is a development technique that tries to bring together the numerous factions of development. Namely BA (Business Analyst), QA (Quality Assurance) and Developer.

There seem to be 2 main flavours the specification based tools and the scenario based tools. I'm going to describe the scenario based tools. DDD (Domain Driven Design) puts lots of emphasis on the need for ubiquotous language for your business. In Scrum there's a near universal understanding of the user story. That tends to follow the "As a" "I want" "So that" where the "So that" describes the business value being derived, and the "As a" describes the user's role. This has proved the be very successful for us. BDD uses "Given" "When" "Then" as it's vocabulary where Given sets the context When defines the action that is being performed and Then asserts the behaviour that is expected.

Just using these 3 simple words has lead to real progress for us, even without tooling and technologies just writing the "BDD Scenarios" down as we say forces the team to think about what we're building on considerable depth. It also nearly always brings out some scenario which we haven't initially considered and we then write scenarios to cover that. What we end up with is a very good understanding of the problem and how our proposed solution is going to work.


Search

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2013