I followed this blog as an example and read the ParallerRunner info. When I call bin/behat
command, one browser window opens and runs all the tests successfully with the setting below.
symfony/behat.yml
default:
context:
class: Site\CommonBundle\Features\Context\FeatureContext
extensions:
Behat\Symfony2Extension\Extension:
mink_driver: true
kernel:
env: test
debug: true
Behat\MinkExtension\Extension:
base_url: 'http://symfony.local/app_test.php/'
javascript_session: selenium2
browser_name: firefox
goutte: ~
selenium2: ~
paths:
features: %behat.paths.base%/src
bootstrap: %behat.paths.features%/Context
I modified the behay.yml (as shown below) to run some tests in one browser window and some in another window, however it doesn't do that. What it does is, it opens two browser windows but they both run same tests! How can I overcome this issue?
symfony/behat.yml
default:
context:
class: Site\CommonBundle\Features\Context\FeatureContext
parameters:
output_path: %behat.paths.base%/build/behat/output/
screen_shot_path: %behat.paths.base%/build/behat/screenshot/
extensions:
Behat\Symfony2Extension\Extension:
mink_driver: true
kernel:
env: test
debug: true
Behat\MinkExtension\Extension:
base_url: 'http://symfony.local/app_test.php/'
files_path: %behat.paths.base%/build/dummy/
javascript_session: selenium2
browser_name: firefox
goutte: ~
selenium2: ~
shvetsgroup\ParallelRunner\Extension:
process_count: 2
paths:
features: %behat.paths.base%/src
bootstrap: %behat.paths.features%/Context
F1:
filters:
tags: "@backend"
F2:
filters:
tags: "@frontend"
BEHAT TESTS:
This should run in one window:
@frontend
Feature: User Login
@javascript
Scenario: I can login to the system
Given I am on "/login"
And I login as "user"
This should run in another window:
@backend
Feature: Admin Login
@javascript
Scenario: I can login to the system
Given I am on "/login"
And I login as "admin"
shvetsgroup/parallelrunner dev-master requires behat/behat >=2.4.6,<3.0 -> satisfiable by behat/behat[2.5.x-dev].
. Of course, one is being developed actively and another isn't! – Jussive