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 🙂

How to add official Chromium-browser PPA repository to Linux Mint 15 and install the latest stable build

Here’s the official Chromium-browser PPA repo:

To install latest stable build follow 3 simple steps:

Step 1:
add “deb raring main” to /etc/apt/sources.list

Step 2:
add repo’s pub key so that we can avoid problems like the one below:

W: GPG error: raring Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A9BF3BB4E5E17B5
sudo gpg --keyserver hkp:// --recv 5A9BF3BB4E5E17B5
sudo gpg --export FBEF0D696DE1C72BA5A835FE5A9BF3BB4E5E17B5 | sudo apt-key add -

btw. using hkp:// will work even if you’re behind a firewall or proxy 🙂

Step 3:
Update package list and install Chromium

sudo apt-get update
sudo apt-get install chromium-browser

Step 4:
Happy browsing 🙂

Use custom Chrome profile with Selenium WebDriver


Today, I was struggling with webdriver and Chrome.
As I found out, currently there’s no built-in webdriver feature that allows start Chrome with custom profile.
Fortunetely I found short work-around 🙂

There’re only 2 steps to follow:
#1: Create custom Chrome profile
#2: Add chrome.switches to Chrome driver capabilities

#1: To create new custom Chrome profile follow these instructions:

#2: Then add new capability to your


capabilities =;
String[] switches = {"user-data-dir=\\path\\to\\your\\custom\\chrome\\profile\\directory"};
capabilities.setCapability("chrome.switches", switches);
webDriver = new RemoteWebDriver(gridServerURL, capabilities);


Hope you’ll find this useful 🙂