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