What techniques do you use to simplify BDD step definitions?

I think the biggest issue it’s not about implementation.
The gherkin is a common language and should be agreed with all involved parties.
If it’s only about QA then it’s in wrong way.

I see following issues with step definitions:

  • duplicated and ambiguity steps
  • complex steps with unique usage just only in one scenario
  • low-level steps focusing on implementation but not on business logic
  • low re-usage and too unique definition
  • too abstract step definition where you don’t the context where to use it

We use testomat.io which have centrilized BDD steps database support. It works really well to understand usage, similarity, renaming and merging steps, having autocompletion based on steps database, etc Soon it will be AI feature to help with duplication, merging and maintenance.

2 Likes