Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to configure and run Selenium TestNG in Bamboo? I need a savior please.

I have selenium TestNG test written in java and using STS IDE. I use testNG.xml file to run it as testNG Suite. I use Bitbucket to store all the repositories. Now I want to run the Selenium TestNG test using Bamboo. I have already connected Bamboo to Bitbucket to use the repositories. But I can't figure out how to configure the testNG.xml file, java file, and the jar to Bamboo.

Does any one have any ideas of how to go about it. I have searched from the net for quite sometime, but I haven't come across any good tutorial or guide of how to go about it. 

Here are the files I was using in STS IDE:


  1. selenium-java-2.44.0.jar
  2. selenium-java-2.44.0-srcs.jar





<!DOCTYPE suite SYSTEM "">
<suite name="JobGo Suite">

<test name="FirefoxTest">
      <parameter name="browser" value="firefox" />
           <class name="com.mnn.MeTab"/>



package com.mnn;

import java.util.Properties;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.internal.Coordinates;
import org.openqa.selenium.internal.Locatable;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

public class MeTab{
    private WebDriver driver;
    private String propertyFileName = "";
    private InputStream inputStream = MeTab.class.getClassLoader().getResourceAsStream(propertyFileName);
    private Properties prop = new Properties();

    * Opens the browser and navigate to the Landing Page
   public void beforeTest(String browser) throws IOException{

       driver = new FirefoxDriver();
    }else if(browser.equalsIgnoreCase("chrome")){
       driver = new ChromeDriver();
    }else if(browser.equalsIgnoreCase("ie")){
       driver = new InternetExplorerDriver();
       throw new RuntimeException("Browser type unsupported");

     driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);


    if( inputStream == null ){
        throw new FileNotFoundException("property file " + propertyFileName +
                " not found in the classpath");

    // navigate to jobgo web site

   // Maximize the browser Window

} // end of method beforeTest

* Method tests the landing page
@Test(priority = 0)
public void testLogin() throws Exception{
//time that elapses as the browser as the browser waits before executing
WebDriverWait wait = new WebDriverWait(driver, 120);

// Text has to be visible before another process is executed

// Click on Login
WebElement muwl = driver.findElement(By.className("Model_User_Widget_Login"));

// From the Login pop up, use the Sign In tab to login known credentials to the application
WebElement username = driver.findElement(By.className("login_form"));

// From the Login pop up, use the Sign In tab to login known credentials to the application
WebElement passwd = driver.findElement(By.className("login_form"));

// Check if 'Remember me' checkbox is not checked then check it
WebElement notChkbox = driver.findElement(By.className("chkbox"));


// If 'Remember me' checkbox is checked then uncheck it
WebElement chkbox = driver.findElement(By.className("chkbox"));


// Click on 'Sign in' button
WebElement signIn = driver.findElement(By.className("login_form"));

// Text has to be visible before another process is executed

* Closes the browser
public void quitDriver() throws Exception{
} // end of method quitDriver


Please any help is welcome. 

Cheers, Nelson

5 answers

The simplest and most scalable way is to used Selenium IDE and this add-on in Bamboo. With one build plan you can target all major browsers from one build plan. 

Hi Alexey,

Thank you so much for the help. At last it has worked out. 



@Nelson Ntege can you please share a sample project/code how you made it work as I am stuck with the same problem. TIA. 

0 votes
Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 07, 2014

Hello Nelson,

I created sample repository with Maven project and WebDriver test:

Please see instructions at Readme section. It looks like you configured everything except Maven capability. please follow link in readme to receive more instructions how to setup it. It's pretty easy, you just need to define path to Maven home folder in your environment.

In case pom.xml is not in the root of your repository you need to specify work folder for Maven task

Hope it helps



Hi @Alexey Chystoprudov @Nelson Ntege

I am trying to execute testng using ant in bamboo. Please visit this link for config details. The problem mentioned in that link has been resolved, but I am unable to execute testng with chromedriver.

I am now getting configuration failure: 1, skips: 1. The testng listener is unable to initialize chromedriver.

How to set chromedriver capability in bamboo? (my bamboo server is on a RHEL server, and driver is located in /usr/local/bin/chromedriver)

Or should I use htmlunit driver? And how to set its capability in bamboo?


PS: Ant and JDK capabilities are already set, and I'm running chrome in headless mode. I haven't also downloaded selenium-java client. i am just working with standalone selenium server jar. 

The tests are successfull in my eclipse IDE and cmd.exe

Hello Alexey,

Thank you so much for the quick reply. I have made the modifications in code using Maven which executes when I use Eclipse IDE.  My biggest problem is with bamboo, I don't have a cue what to put in Executable and Environment variable fields as shown below. 

In the Executable field I have tried to link it up with the JARS from my local machine, but nothing happens. 

image2014-11-6 21:43:25.png


The repository attached to Bamboo from Bitbucket contains mnn_maven folder (master branch). Inside it, it has the pom.xml and src/com/mnn/

Please guide me from here as the configuration seems to be my biggest issue.










Krystian Brazulewicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 12, 2014

It always pays off to read documentation:

0 votes
Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 05, 2014

Hello Nelson,

To execute your tests in Bamboo you should use some executable build tool. Bamboo supports Ant, Maven, Command line, Grails.

Example of Maven configuration for TestNG tests:

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events