Run your Selenium driven tests in parallel using TestNG.

Sometime ago I came across this post:
And I thought it’d be good to have it in a repo to save you time setting up your own project.

Basically this example project runs JUnit tests in parallel using TestNG.
Tests are grouped by the browser in which they’re going to be executed (have a look at the TestNG XML Suite files in src/test/resources).
As you might have guessed to drive the browsers we use Selenium WebDriver 🙂
And of course you can run your tests locally or remotely using Selenium GRID.

You can find the repo here:

And here’s a video showing this project in action 🙂

Replacing FF driver with Chrome in JBehave’s tutorial project

Hi All,

Recently I’ve started playing with JBehave or rather with their interesting extension JBehave-web

JBehave-Web is a collection of extension for JBehave that extend its capabilities in ways related to HTTP and the web.

As a starting point I tried running an example project available here:
After getting bored with running all the tests in FF, I’ve decided to replace it with Chrome. Below is the short tut. describing how to do that 🙂

Steps to get you there:

  1. Download chrome driver
  2. Change the webDriver to a PropertyWebDriverProvider
  3. Set System Properties

Step 1)
Download chrome driver that suits your needs:
Extract it wherever you want.

Step 2)
Change the webDriver from FirefoxWebDriverProvider to a PropertyWebDriverProvider that allows running your tests with Google Chrome.
Edit etsy-steps.xml located […]/jbehave-tutorial/etsy-stories-java-spring/src/main/resources/etsy-steps.xml
and replace a FirefoxWebDriverProvider bean with a PropertyWebDriverProvider:

<bean id="driverProvider" class="org.jbehave.web.selenium.PropertyWebDriverProvider" >

Step 3)
To set System Properties, edit Maven’s etsy-stories-java-spring module config file: […]/jbehave-tutorial/etsy-stories-java-spring/pom.xml
Follow this xpath to add the new props in the right place:

/pom:project pom:build/pom:plugins/pom:plugin/ pom:executions/pom:execution[2]/pom:configuration


ps. in case you’ll encounter problems solving all the dependencies while running the demo project, just add repos listed below to your main project Maven config file: ([…]/jbehave-tutorial/pom.xml)

      <name>jbehave web repo</name>

      <name>Codehaus Snapshots</name>