Step definition checklist

Last updated on
11 March 2021

This documentation needs work. See "Help improve this page" in the sidebar.

All custom step definitions should:

  • Follow coding standards
  • Use valid, robust selectors
  • Be placed in the right def block
  • Properly chain steps
  • Reuse existing step definitions where possible
  • Avoid fragile definitions
  • Throw exceptions in the proper place
  • Provide meaningful exception text
  • Add proper step definition description above the regular expression so that it will appear when you type bin/behat -di
  • When writing a new step definition, write in such a way that it is more flexible and should be able to reuse with minor or no modifications

Help improve this page

Page status: Needs work

You can: