Running Cross browser BDD scenarios in Parallel with ANT

Cross-Browser BDD Scenarios

Cross-Browser testing is a essential part of the automated test suite. While working with Behaviour Driven Development tools like Cucumber and Behat, we must have necessary setup to run BDD scenarios in parallel. Let’s consider, we have test suite which runs in Firefox, Safari and Google in parallel. What an awesome idea !

In this tutorial we will we will see how to run cross-browser BDD scenarios in parallel using apache-ANT

Apache ANT

Apache ANT is a java based build tool. You can use another  build tools like phing Or maven but I like ANT as it’s very simple to learn and so powerful.

Install ANT

There is complete installation guide on the apache ant website here. I think, you are smart enough to google it and get ANT installed on your machine

On my Mac OSX, ANT is pre-installed  if not then install it through Mac Port

Test ANT Installation

If you have successfully installed ant you will get something like this if you run ‘ant’ command from your terminal.

Check ANT version and installation. You will see something like this.




You need to setup Behat project as mentioned on my Github repository “Behat-CrossBrowser-Parallel” I will concentrate on main config in this tutorial.


Create a separate profile for each browser as we have created in behat.yml as shown below



This is a main config where we are creating separate targets for the each profile also generating nice looking html reports for each browsers. Try to understand config below

Once you done with config, you need to run ANT with main target called “run”


Source-Code is available on GitHub. You can directly clone GitHub repository from here 

Don’t forget to start selenium-server before running tests. You should  run following commands..

Enjoy Cross-Browser BDD scenarios running in parallel. Watch Youtube video demo

Happy BDD !!