“Profound things are simple. If it is not simple then it cannot be true. But simple things are difficult”
This quote is absolutely true for BDD as a methodology and tools implementing it as well. But most of the times we tend to lose the essence of even simple things by not focussing on the fine prints. In any BDD project, feature files are the essence of overall implementation, and this very fact gets lost in the drive to implement the definitions beneath it. In this article, we discuss some of the BDD writing Guidelines and Best Practices.
A poorly written feature file serves no purpose, rather it sets up the project for increased complexity, maintenance, overall development effort and eventually loses the goal of quality deliverables with behavioral feedback.
Unless a team sets out with common goal, proper guidelines and strict review checklists, it is very likely to have:
At Wavelabs, we follow certain guidelines for each step of automation development, whether it is writing feature files the right way or removing the smell from code. Below are some of the questions which our developers ask before authoring any feature file:
Feature
Background
Scenario/Scenario outline
Example tables
Steps
If you have thought about various implications of the above questions and the answer for all the above questions is YES, then you are on the right track.
Below is the mind map containing best practices for writing a perfect feature file:
Want to know more about best practices, principles, frameworks and reusable assets? Get in touch with us by filling the below form.