How to use Behat and Phantom JS on Circle CI or Travis CI

A few months ago, I started working on some behavior tests for a javascript heavy website. I chose to write the tests in Behat, and wanted to use the Phantom JS driver because it would be faster than running Selenium 2 with a real browser. It also had to run on Circle CI. Once I got this working, several people asked for help getting theirs working, and some were using Travis CI. I threw together this demo repository which has a walkthrough of all the steps you need to follow to get these tools working together on either CI service.

Behat & PhantomJS: An example of using the Behat Selenium2 Mink Driver to power PhantomJS, and integrate with both CircleCI and TravisCI

Please let me know if this helps you, or if you have any questions!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s