RE: Selenium WebDriver Junit tests failing inconsistently running via Bamboo

I am working on JUnit tests using Selenium WebDriver.  Currently, I have 75 tests running in two different OS, running in Firefox browser.

When the tests are executed using EclipseIDE and ANT, they run successfully. However, when they run via Atlassian Bamboo, they don’t always Pass. So, I am having a inconsistency issue. Mostly, the error are due to timeout. I am investigating, what the cause. Mean time, I thought of posting the question here, in case anyone has run into this kind of issue.

Any suggestion, comment, helpful info is appreciated.


amanandhar Train Asked on February 11, 2016 in Selenium WebDriver.

Hi Aman,

Are you using too much Thread.sleep in your script..?
What is the implicit timeout set in your script..?

on February 12, 2016.

Sorry,  I didn’t see this question until just now.

I am not using too much Thread. sleep. There are few places where I am using about 2 seconds of it.

For the driver, I have most of the places the 5 seconds wait.
–  driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);

In places where I need the Page to Load, I have the longest 20 second wait as below.
–  WebDriverWait wait = new WebDriverWait(driver, 20);

I hope this helps.


on February 16, 2016.
Add Comment
3 Answers
Sorry about not providing enough information. Will this information help?

The tests are timing out when they are looking for texts, trying to click a button, comparing menu buttons, compare table data etc.

Below are few examples and I hope this helps.

4. junit.framework.AssertionFailedError: expected [true] but found [false]  [This is not an issue when I execute test via EclipseIDE. Could this be because I am using TestNG assertion?]

Train Answered on February 15, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.