First of all, we need to keep in mind that BDD (Behavior Driven Development) is a form of agile software development and that the main objective of BDD is to establish an easy way to communicate the idea to other people. Developers, testers, investors and customers
can understand and discuss software requirements, to create a clearer test and validations to obtainan a good product/service with fewer defects.
The structure of BDD is:
Scenario: a title of your requirements;
Given: the state of the system that will receive the behavior/action;
When: the behavior/action that happens and causes the result in the end;
Then: the result caused by the behavior in the state;
"Ok" - you may think -"so... there's no error in this methodology". Well... not yet. If you are too simple or too detalist you take the risk of not reaching the right point of your issue.
"And how do I reach the central point of my cases?". Well, I got these steps:
Try to create accessible scenario. Paying attention to the most recurring situations and requirements is a good way to guarantee the integrity and quality of your software. Create scenarios that are easily identified as "Success" and "Failure" because this will help the user to see through the objective.
To execute a scenario, lowering the complexity of the action makes the test more comprehensible and helps the person behind the test o understand the response a little better.
In addition to avoiding creating very simple or very complex test cases, it is important to create test cases that are recurring. Always prioritize the main actions of your software to guarantee the delivery of the main functions. With the main functions tested, you will be able to spend more time with less recurring actions.
Before all these steps, make sure that the anwsers will make sense with your main objective. Collecting and analyzing responses are points of important attention as these are the ways that will inform your team if the final product needs to evolve and where it needs to evolve.
Well, that's it guys.