Cucumber Best Practice

For those of you have difficulty understanding what a good cucumber suite looks like it might be worthwhile taking a look at the cuke_sniffer gem.

It’s a neat gem that searches your cucumber project for smells and gives you not only a score but a detailed list of the smells and exactly where they are.

You can output a high level list in terminal just by running cuke_sniffer but of more value is the ability to generate a report by cd-ing to your project folder and running:

gem install cuke_sniffer
cuke_sniffer --out html reports/cuke_sniffer_report.html

The html report allows you to see exactly where the issues so that you can rectify them.

I love the fact that it picks up the use of physical implementation words such as page, click, dropdown, window, radio button etc. have been used  – it’s a great report to run to encourage the team to define the intent not the physical solution in the Gherkin.




One thought on “Cucumber Best Practice

Please leave a comment - any questions or feedback welcome.

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s