Unable to run jUnit tests from Intellij command line with Gradle, Serenity Bdd and Selenium

38 views
Skip to first unread message

larisa grecu

unread,
Dec 16, 2016, 4:10:03 AM12/16/16
to Selenium Users

I keep having very often the below error when running jUnit tests from Intellij command line with the following command: gradlew clean test aggregate -Dtags="domain:SmokeTests".


The page object class de.telekom.commtech.bart.pages.common.TelekomLandingPageObject looks dodgy: Failed to instantiate page (net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate class org.openqa.selenium.firefox.FirefoxDriver) de.telekom.commtech.bart.steps.AbstractScenarioSteps.getTelekomLandingPageObject(AbstractScenarioSteps.java :52) de.telekom.commtech.bart.steps.inbox.AuthNavigationSteps.landingPageShouldAppear(AuthNavigationSteps.java :245) de.telekom.commtech.bart.testcases.BaseTest.login(BaseTest.java :447) de.telekom.commtech.bart.testcases.adressbook.lefthandnavigation.AdressBookContactsGroupTestCase.setup(AdressBookContactsGroupTestCase.java :46)


I use latest version of Serenity Bdd (1.1.42) , Selenium 2.53, and Firefox 47.0.2, Windows 8.1. I tried downgrading Firefox to a lower version like 45.0, but it acts the same.
If I run the tests individually with Run Configuration, I don't get that error, but sometimes I get this error:


java.lang.RuntimeException: Process refused to die after 10 seconds, and couldn't taskkill it: Timeout waiting for process to die at org.openqa.selenium.os.ProcessUtils.killWinProcess(ProcessUtils.java:143) at org.openqa.selenium.os.ProcessUtils.killProcess(ProcessUtils.java:81) at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.destroyHarder(UnixProcess.java:247) at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.access$200(UnixProcess.java:201) at org.openqa.selenium.os.UnixProcess.destroy(UnixProcess.java:125) at org.openqa.selenium.os.CommandLine.destroy(CommandLine.java:155) at org.openqa.selenium.firefox.FirefoxBinary.quit(FirefoxBinary.java:246) at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.quit(NewProfileExtensionConnection.java:194) at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.quit(FirefoxDriver.java:364) at org.openqa.selenium.firefox.FirefoxDriver.stopClient(FirefoxDriver.java:310) at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:529) at net.thucydides.core.webdriver.WebDriverFacade.forcedQuit(WebDriverFacade.java:125) at net.thucydides.core.webdriver.WebDriverFacade.reset(WebDriverFacade.java:117) at net.thucydides.core.webdriver.WebdriverProxyFactory.resetDriver(WebdriverProxyFactory.java:86) at net.serenitybdd.junit.runners.SerenityRunner.prepareBrowserForTest(SerenityRunner.java:476) at net.serenitybdd.junit.runners.SerenityRunner.runChild(SerenityRunner.java:423) at net.serenitybdd.junit.runners.SerenityRunner.runChild(SerenityRunner.java:52) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at net.serenitybdd.junit.runners.SerenityRunner.run(SerenityRunner.java:241) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.openqa.selenium.os.ProcessUtils$ProcessStillAliveException: Timeout waiting for process to die at org.openqa.selenium.os.ProcessUtils.waitForProcessDeath(ProcessUtils.java:67) at org.openqa.selenium.os.ProcessUtils.killWinProcess(ProcessUtils.java:139) ... 33 more Caused by: java.lang.InterruptedException at java.lang.ProcessImpl.waitFor(ProcessImpl.java:451) at org.openqa.selenium.os.ProcessUtils$ProcessWaiter.run(ProcessUtils.java:164) ... 1 more


Does anyone has a clue on this?

Reply all
Reply to author
Forward
0 new messages