BDD - Behat 3 with Mink and Mink Extensions against monster.co.uk website
This example will demonstrate the following:
- Failed steps via AfterStep hook screenshots saved into the screenshot directory
- Mink-Extensions libray of pre-existing steps
- Behat
- Custom Steps e.g. to create unique registrations on monster.co.uk
Notes:
- PHP needed ( comes standard on a Mac, or install)
- use the terminal
- Java needed ( comes standard on a Mac- I think?, or install)
- I have noticed that using the Chrome browser brings up the new monster.co.uk website on www6.monster.co.uk. Firefox appears to only bring this site up on every 4th request.
- I needed to add php.ini date timezone = 'Europe/London' for the php date command to work
- use different tags @wip or none to run all the scenarios.
The instructions below are likely to work on a Linux or Mac
Steps
- Download this repository
- get composer
curl -sS https://getcomposer.org/installer | php - run the command
php composer.phar install - download the standalone Selenium 2 Webdriver Jar file ( http://seleniumhq.org)
- start the standalone Selenium2 webdriver ( open up another terminal )
java -jar ./selenium-server-standalone-2.48.2.jar - execute the behat test using
./vendor/bin/behat --tags @wip --append-snippets --suite=backend ./features/monster_search.feature