Hello everyone!

We have been investing plenty of personal time and energy for many years to share our knowledge with you all. However, we now need your help to keep this blog running. All you have to do is just click one of the adverts on the site, otherwise it will sadly be taken down due to hosting etc. costs. Thank you.

This example is for two bundled applications.


Behat.yml


First of all, you need selenium server standalone running. You can take screenshots of failed scenarios and you can set browser window size in FeatureContext. Check other posts in this blog to see how you can run selenium server.


default:
formatter:
name: pretty
parameters:
output_styles:
comment: [ magenta ]
context:
parameters:
output_path: %behat.paths.base%/build/phing/behat/output/
screen_shot_path: %behat.paths.base%/build/phing/behat/screenshot/
extensions:
Behat\Symfony2Extension\Extension:
mink_driver: true
kernel:
env: test
debug: true
Behat\MinkExtension\Extension:
files_path: %behat.paths.base%/build/dummy/
javascript_session: selenium2
browser_name: firefox
goutte: ~
selenium2: ~
paths:
bootstrap: %behat.paths.features%/Context

# bin/behat --profile=backend
backend:
context:
class: Application\BackendBundle\Features\Context\FeatureContext
extensions:
Behat\MinkExtension\Extension:
base_url: 'http://football.local/app_test.php/backend/'
paths:
features: %behat.paths.base%/src/Application/BackendBundle/Features

# bin/behat --profile=frontend
frontend:
context:
class: Application\FrontendBundle\Features\Context\FeatureContext
extensions:
Behat\MinkExtension\Extension:
base_url: 'http://football.local/app_test.php/'
paths:
features: %behat.paths.base%/src/Application/FrontendBundle/Features