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.

Behat tests run faster with PhantomJS so follow the steps to install and use it.


Installation


Check out this resource to install it.


Behat.yml


These part goes into behat.yml file. Just stick it at the bottom of it.


.....
.....
.....

phantomjs:
extensions:
Behat\MinkExtension\Extension:
base_url: 'http://localhost/local/symfony/web/app_test.php/'
javascript_session: selenium2
browser_name: phantomjs
goutte: ~
selenium2: ~

Run it


To run it, you use -p phantomjs tag in your behat command.


bin/behat --profile=profile_name -p phantomjs