Using Behat, Mink, Drupal Extension to regression test a D7 multisite

Events happening in the community are now at Drupal community events on www.drupal.org.
marcus_clements's picture

In my last role we used a comprehensive suite of functional tests written in Cucumber using Capybara and Selenium to help discover regression errors.

In my new role I am working with a D7 multisite with 40+ sites and I want to use Behat and Mink for the same job. My plan is to write a set of tests that check the key functionality of all the sites which will run on our dev and staging servers after deploying a release candidate.

I've got some basic tests running fine using the Goutte driver.

There will be a set of tests that are common to all sites, the base url being the only difference. Other tests will be valid for a subset of sites. I'm trying to work out the best way to execute the same test across a set of sites. So far my best idea is to use profiles in behat.yml and execute them in turn with a script, probably managed in Jenkins. However it might be good to be able to specify on which sites the tests are performed in the Feature, or maybe in each Scenario.

Can Scenario Outlines be shared in Behat/Gherkin, so I could define sets of sites and re-use them for multiple scenarios?
Is there something similar in Behat/Gherkin to run a feature a number of times but with a different parameter?

Any suggestions gratefully received.

Comments

Gherkin filters

frank ralf's picture

Hi Marcus,

You might structure your features using a combination of profiles and filters:

For running the same scenario with different parameters use scenario outlines:
http://docs.behat.org/guides/1.gherkin.html#scenario-outlines

hth
Frank

Behat

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: