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.

Thanks

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.

Thanks

on February 16, 2016.
Add Comment
3 Answers
The following are additional information, please let me know if this helps…

* selenium version – selenium-java-2.48.2, selenium-server-standalone-2.48.2
* browser flavor and version – Firefox 39 on Windows 7, 40 on Windows 10
* test code  – I have provided one of the simple tests that keeps failing inconsistently…

@Test

public void verifyMinLengthBG() {
LoginMethod login = new LoginLogoutMethod ();
CommonMethod common = new CommonMethod ();
log.info(“Running test method verifyMinLengthBGGroup”);
login.login(“username”, “password”);
common.clickLinkByName(driver, “Settings”);
common.clickSubMenuOption(driver, “/business-groups”);
common.clickDataTableRow(driver, “FirstTestBG”);
common.clearTextBox(driver, “name”);
common.clickButtonByTitle(driver, “Accept”);
common.checkForInvalidInput(driver, “name”);
common.clickButtonByTitle(driver, “Discard”);
}
* html source of the page – I am not sure I am able to provide the HTML source
Thanx
Train Answered on February 15, 2016.
Add Comment

Your Answer

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