Behat for Product Owners

Posted: 2015-07-31 13:18:04

As a developer putting all the business requirements into action and then showing that it is working as expected can be hard. 10 different google docs, 3 different views of what are the goals etc.

And as a Product Owner you are not sure if the work is done without always clicking around. And more importantly you do not even know if the developer really gets what you want.

This is where Behat / Gherkin (cause that name really gets Product Owners feeling comfortable) can help out. BUT the key is to remove ALL language barriers.

Gathering the Business Requirements into a Gherkin File

Just open up a text editor, or google doc or even email, talk to the product owner, even share your screen, and write it with them.

Feature: Reporting Goals for Product Foo
   So I can decide what to order for next week
   As a the business manager
   Should allow me to see products, sort and filter


  Scenario: Visit Reporting Page
    I should be able to go to the report page
    See all the products but only 100 per page to keep it easy to see
    No products should be here that are not "active"
    Filter by types of products using many filters at once
    Paginate on those filter results
    Export to a spreadsheet those results

  @done
  Scenario: Visit Reporting Page and do not have permission to be here
    As a non admin person who goes to the reports page I should not be allowed to go here


So at this point there are 3 things they need to know and at that the rest is freeform.

Feature

This is a one line look at the goal of this area, requirement.

The Three Lines After the Feature

Benefit, Role or User or Feature, The Feature itself

Scenario

Start your small bite size goals here. Maybe there is just one? Maybe there are also negatives to consider like Scenario: Someone how does not have permission goes here

Tagging

Also maybe agree on some simple tags

@done = um done

@wip = work in progress

@needs_review

Etc.

Now What

At this point the Owners and Developers hopefully have what they need to start writing. Behat so easily let's us make custom steps that we can turn any of this into steps and even better code.

And as an Owner you can go simply to github and add these tests if you feel comfortable (yes some even are okay with this) and write it as the business needs it not as "gherkin" needs it.


Tags:

bdd behat