Cucumber Documentation Summary

Anti Pattern

There are several anti-patterns, we should avoid them. The described patterns are

  1. Feature-coupled step definations
  2. Conjunction steps

Feature-coupled step definations

…those steps that can’t be reused across feature or scenarios.

How to decouple steps & step definations

  • organize steps by domain concept
  • use domain-related names for steps and step definations

Conjunction steps

…those steps which combines a bunch of different things. Cucumber has `And`, `But` for a reason. For composition and reuse we can create related helper methods as another step can’t be called from inside a step in step definations file.

You want to strive to keep your steps atomic as much as possible.

Thoughts on cucumber anti-pattern blog

…read the blog yourself here