Joseph Wilk

Joseph Wilk

Things with code, creativity and computation.

Allowing Features to Breathe

Your Cucumber features are living documentation. The world is evolving around them and without exposure they tend to rot.

Evolving language

When features are written we use a snapshot of the domain language at some specific timeframe. This ubiquitous language changes and grows outside the codebase and is influenced by more than just developers. When do we refactor features to reflect these changes?

Taints

Since the features are in the code base it becomes the developers/QAs responsibility to maintain them. When writing the features for the first time we have lots of discussion. But at a later date the feature language may be tweaked by a developer to allow reuse or some new technical constraint means they want a special step added. This is where taints can sneak into the language.

Quality

It’s amazing what a difference it makes when people know something they are writing will be published and read by others. Exposing the features can help increase their quality.

Barriers to entry

It’s great that the features sit close to the code but there is a barrier in how you gain access to that code. While developers find source control like second nature its something that gets in the way for non-technical people.

Allowing features to breathe

When someone wants to know about the behaviour of a feature they should be able to turn to the features irrelevant of technical expertise. This engenders discussion which helps bring about changes to the features to better reflect the ubiquitous language and remove taints. The easier it is to access the features the more likely they are to be the first port of call.

So my advice is exposure your Cucumber features to your team (and if possible your users, which Rspec has done with Relish), allowing them to browse and question them.

Relish

To expose features I currently use Relish. This is a web based browser for features.

Relish has a command line gem for pushing features up to the website. I use a post-receive server git hook which upon every push also pushes the features to Relish.

.git/hooks/post-receive

#!/bin/sh
relish push --project air --organization breathe

Comments