lundi 31 octobre 2016

How to run database fixtures on acceptance tests with Behat, Mink and Zombie.js

I'm starting with acceptance testing using Behat (PHP version of Cucumber). I'm planning to run it using Mink and Zombie.js (for basic JS testing).

As far as I understand, Zombie is a headless browser that will output whatever my URL (localhost) returns, which Mink will use to traverse as a DOM element.

It doesn't really seem like I can pass ENV variables or run it with different kind of parameters, which renders me unable to do things like running fixtures or rolling back database changes before the test; unless I write a script to automatically change the database name in the app configuration before running, and change it back afterwards.

Any help, if possible with examples, will be appreciated.

Aucun commentaire:

Enregistrer un commentaire