Run your Selenium driven tests in parallel using TestNG.

Sometime ago I came across this post:
http://rationaleemotions.wordpress.com/2013/07/31/parallel-webdriver-executions-using-testng/
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: https://github.com/kowalcj0/parallel-selenium-with-testng

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: https://launchpad.net/~chromium-daily/+archive/stable

To install latest stable build follow 3 simple steps:

Step 1:
add “deb http://ppa.launchpad.net/chromium-daily/stable/ubuntu 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: http://ppa.launchpad.net raring Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A9BF3BB4E5E17B5
sudo gpg --keyserver hkp://keys.gnupg.net:80 --recv 5A9BF3BB4E5E17B5
sudo gpg --export FBEF0D696DE1C72BA5A835FE5A9BF3BB4E5E17B5 | sudo apt-key add -

btw. using hkp://keys.gnupg.net:80 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

Hi,

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

Steps:
#1: To create new custom Chrome profile follow these instructions:
http://www.labnol.org/software/create-family-profiles-in-google-chrome/4394/

#2: Then add new capability to your

//....

capabilities = DesiredCapabilities.chrome();
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 🙂

Cheers,
J