[BDD] - Do not reuse steps.
I'm starting to work with BDD, but I have a doubt.
When creating some scenarios, I am facing a problem, as some have similar characteristics, example: (save button, open button, delete button), I have three forms that have buttons with the same name, but when I am creating the steps to generate the step definition, it does not generate because the mapping of these fields was done in another form, the problem that I have elements with different id's for each form.
Is there a way to always be the only steps?
Tks for Help and Sorry for my English
Your steps should be business/user and behavior driven not application driven.
From a behavior/user point of view save button and open button have no meaning, no sense of business achievment.
Instead of save button you should create actions/steps like:
When I save <my monthly metrics/user profile>...
From a behavior/test stand of view nobody cares about the implementation on a step level. If its a button, a drag and drop or an automatic action, the results his the same. The implementation is documented in the step, or a comment, it can change but does not change the behavior/needs/conditions!
3 forms ==> 3 behavior/business goals/needs => 3 distincts names.