Skip to main content
Steven Merrill

Testing Drupal with Ghosts and Gherkins at DrupalCampNJ

This post was originally posted on the Phase2 Blog.

This weekend marked the second annual DrupalCamp New Jersey at beautiful Princeton University.

I was happy to fill in when a presenter dropped out and presented a session called "Testing Drupal with Ghosts and Gherkins". In this presentation, I talked about how both CasperJS or Behat could be brought to bear to test a Drupal application and gave some demos of each. The slides are embedded below.

Testing Drupal with Ghosts and Gherkins from Phase2 Technology

Here are some links to the items demoed in the presentation so that you can give them a shot on your own sites.

Information about CasperJS is available at its website, casperjs.org. You can read more about CasperJS's parent project, PhantomJS, at phantomjs.org.

The sample CasperJS scripts adapted from our Testing with Friendly Ghosts presentation are available on GitHub at github.com/ericduran/friendly-ghosts-examples.

Similarly, documentation for both Behat and the Mink browser-testing extension is available at behat.org.

If you'd like to try out a sample project that uses Behat and Mink and one custom Mink step definition to test some sample assertions on the Phase2 website, it's on GitHub at github.com/phase2/behat-phase2tech/.

Finally, our set of Drupal-based Behat and Mink step definitions are released as Open Source on GitHub at github.com/phase2/behat-drupal-extension.