Closed jurec72 closed 2 years ago
Looks like your VM is having trouble supporting the load of the parallel tasks you are running. Webdriver generally doesn't scale very well on individual machines beyond a small number of parallel browsers
Thank you for answer.
I use Serenity Cucumber 7 Maven Java(11), when execute on VM for random tests get below error, if run separate all work perfect and sometimes it is running only 40 tests from 90, but when run 90 then get error below.
` net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class org.openqa.selenium.chrome.ChromeDriver at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:146) at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:134) at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:104) at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:174) at net.serenitybdd.core.pages.PageObject.openPageAtUrl(PageObject.java:983) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:881) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:869) at SonicAutomation@1.0-SNAPSHOT/actions.ui.arc_pro.AP_LoginActions.openSignInPage(AP_LoginActions.java:20) at SonicAutomation@1.0-SNAPSHOT/actions.ui.arc_pro.AP_LoginActions.loginToArcPro(AP_LoginActions.java:14) at SonicAutomation@1.0-SNAPSHOT/actions.ui.arc_pro.AP_LoginActions$ByteBuddy$ywc3oU4b.loginToArcPro$accessor$f9cDijJB(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at net.thucydides.core.steps.BaseMethodRunner.invokeMethod(BaseMethodRunner.java:18) at net.thucydides.core.steps.NormalMethodRunner.invokeMethodAndNotifyFailures(NormalMethodRunner.java:18) at net.thucydides.core.steps.StepInterceptor.runNormalMethod(StepInterceptor.java:406) at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:191) at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:84) at net.thucydides.core.steps.ProxyConfiguration$InterceptorDispatcher.intercept(ProxyConfiguration.java:51) at SonicAutomation@1.0-SNAPSHOT/actions.ui.arc_pro.AP_LoginActions$ByteBuddy$ywc3oU4b.loginToArcPro(Unknown Source) at SonicAutomation@1.0-SNAPSHOT/steps.ui.arc_pro.AP_LoginSteps.login_to_arc_pro_with_username_client(AP_LoginSteps.java:15) at ?.login to ArcPro with username "automationusernt@gmail.com", client "AutomationArcPro_Sonic"(file:///E:/V/01-Au04/_work/55/s/src/test/resources/features/ui/arc_pro/general_publishing_settings.feature:15) Caused by: net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate new WebDriver instance of type class org.openqa.selenium.chrome.ChromeDriver (Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.). See below for more details. at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:146) at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:143) at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:134) at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:104) at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:174) at net.serenitybdd.core.pages.PageObject.openPageAtUrl(PageObject.java:983) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:881) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:869) at SonicAutomation@1.0-SNAPSHOT/actions.ui.arc_pro.AP_LoginActions.openSignInPage(AP_LoginActions.java:20) at SonicAutomation@1.0-SNAPSHOT/actions.ui.arc_pro.AP_LoginActions.loginToArcPro(AP_LoginActions.java:14) at SonicAutomation@1.0-SNAPSHOT/actions.ui.arc_pro.AP_LoginActions$ByteBuddy$ywc3oU4b.loginToArcPro$accessor$f9cDijJB(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at net.thucydides.core.steps.BaseMethodRunner.invokeMethod(BaseMethodRunner.java:18) at net.thucydides.core.steps.NormalMethodRunner.invokeMethodAndNotifyFailures(NormalMethodRunner.java:18) at net.thucydides.core.steps.StepInterceptor.runNormalMethod(StepInterceptor.java:406) at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:191) at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:84) at net.thucydides.core.steps.ProxyConfiguration$InterceptorDispatcher.intercept(ProxyConfiguration.java:51) at SonicAutomation@1.0-SNAPSHOT/actions.ui.arc_pro.AP_LoginActions$ByteBuddy$ywc3oU4b.loginToArcPro(Unknown Source) at SonicAutomation@1.0-SNAPSHOT/steps.ui.arc_pro.AP_LoginSteps.login_to_arc_pro_with_username_client(AP_LoginSteps.java:15) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at io.cucumber.java.Invoker.doInvoke(Invoker.java:66) at io.cucumber.java.Invoker.invoke(Invoker.java:24) at io.cucumber.java.AbstractGlueDefinition.invokeMethod(AbstractGlueDefinition.java:47) at io.cucumber.java.JavaStepDefinition.execute(JavaStepDefinition.java:29) at io.cucumber.core.runner.CoreStepDefinition.execute(CoreStepDefinition.java:66) at io.cucumber.core.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:63) at io.cucumber.core.runner.ExecutionMode$1.execute(ExecutionMode.java:10) at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:86) at io.cucumber.core.runner.TestStep.run(TestStep.java:57) at io.cucumber.core.runner.PickleStepTestStep.run(PickleStepTestStep.java:51) at io.cucumber.core.runner.TestCase.run(TestCase.java:95) at io.cucumber.core.runner.Runner.runPickle(Runner.java:75) at io.cucumber.junit.PickleRunners$WithStepDescriptions.lambda$run$1(PickleRunners.java:109) at io.cucumber.core.runtime.CucumberExecutionContext.lambda$runTestCase$3(CucumberExecutionContext.java:151) at io.cucumber.core.runtime.RethrowingThrowableCollector.executeAndThrow(RethrowingThrowableCollector.java:23) at io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:151) at io.cucumber.junit.PickleRunners$WithStepDescriptions.run(PickleRunners.java:106) at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:144) at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:28) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at io.cucumber.junit.FeatureRunner.run(FeatureRunner.java:137) at io.cucumber.junit.CucumberSerenityRunner.runChild(CucumberSerenityRunner.java:259) at io.cucumber.junit.CucumberSerenityRunner.runChild(CucumberSerenityRunner.java:58) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:405) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:576) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:245) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:161)
at org.openqa.selenium.chromium.ChromiumDriver.(ChromiumDriver.java:108)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:106)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:93)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:82)
at net.serenitybdd.core.webdriver.driverproviders.ChromeDriverProvider.lambda$newInstance$0(ChromeDriverProvider.java:68)
at net.serenitybdd.core.webdriver.driverproviders.ProvideNewDriver.withConfiguration(ProvideNewDriver.java:40)
at net.serenitybdd.core.webdriver.driverproviders.ChromeDriverProvider.newInstance(ChromeDriverProvider.java:64)
at net.thucydides.core.webdriver.WebDriverFactory.createWebDriver(WebDriverFactory.java:157)
at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:136)
... 62 more
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '4.1.2', revision: '9a5a329c5a'
System info: host: 'fwdazet-vsts01', ip: '10.183.176.247', os.name: 'Windows Server 2016', os.arch: 'amd64', os.version: '10.0', java.version: '11'
Driver info: driver.version: ProvideNewDriver
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:230)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:98)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:558)
... 73 more
Caused by: java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '4.1.2', revision: '9a5a329c5a'
System info: host: 'fwdazet-vsts01', ip: '10.183.176.247', os.name: 'Windows Server 2016', os.arch: 'amd64', os.version: '10.0', java.version: '11'
Driver info: driver.version: unknown
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2022)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:220)
... 75 more
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '4.1.2', revision: '9a5a329c5a'
System info: host: 'fwdazet-vsts01', ip: '10.183.176.247', os.name: 'Windows Server 2016', os.arch: 'amd64', os.version: '10.0', java.version: '11'
Driver info: driver.version: unknown
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:251)
at org.openqa.selenium.remote.service.DriverService.lambda$start$1(DriverService.java:205)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
... 3 more
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:58666/status] to be available after 20000 ms
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:89)
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:247)
... 5 more
Caused by: java.util.concurrent.TimeoutException
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:204)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:87)
... 6 more
`