Acceptance Testing

Drupal BDD -- Looking for the presence of a form on a page with Behat

I am working on a project where I am writing some custom Behat steps, as the steps that come pre-defined with Behat, Mink and the Drupal Extension are simply not adequate for user friendly scenario steps. The step I just wrote and tested, which is fairly simple but makes writing scenarios for this particular project much easier, allows you to look for the presence of a form within a region of a page using its HTML ID or HTML name, and is outlined here.

Adding custom step stubs to your FeatureContext file automatically

I recently started using Behat for User Acceptance Testing with some of my client projects, and just ran across a very extremely useful snippet in the Behat Documentation, for automatically adding the Behat generated method stubs for custom steps to your FeatureContext class file.