getgauge / template-java-maven-selenium

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gauge_maven_selenium project is erroring out when enable_multithreading is set to true

manavghaigit opened this issue · comments

I am trying to run tests in parallel and it works fine as long as enable_multithreading is set to false. But the moment i set it to true, only one browser opens and gauge starts reporting errors during execution.

  1. Create a new project gauge_maven_selenium from vscode
  2. Create two different specs with some scenarios in it (Note: In my case i just copied example.spec to create example1.spec which has same scenarios)
  3. Set enable_multithreading to true in default.properties
  4. Run the command in Terminal - mvn gauge:execute -DspecsDir=specs -DinParallel=true -Dnodes=3
  5. Below is the output with error details
[INFO] Scanning for projects...
[INFO]
[INFO] --------< gauge_java_maven_selenium:gauge_java_maven_selenium >---------
[INFO] Building gauge_java_maven_selenium 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- gauge-maven-plugin:1.4.3:execute (default-cli) @ gauge_java_maven_selenium ---
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Executing in 2 parallel streams.
Starting ChromeDriver 86.0.4240.22 (398b0743353ff36fb1b82468f63a3a93b4e2e89e-refs/branch-heads/4240@{#378}) on port 20918
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Dec 02, 2020 2:59:30 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
[runner: 2] # Getting Started with Gauge
[runner: 1] # Getting Started with Gauge
[runner: 1]   ## Get Started_1
[runner: 2]   ## Get Started_1
[runner: 1]   ## Get Started_2
[runner: 2]
        Failed Step: Go to Gauge Get Started Page
        Specification: specs\example.spec:11
        Error Message: org.openqa.selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document
          (Session info: chrome=86.0.4240.198)
        For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/stale_element_reference.html
        Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
        System info: host: 'QAX64VDI0043', ip: '10.71.65.249', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.7'
        Driver info: org.openqa.selenium.chrome.ChromeDriver
        Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 86.0.4240.198, chrome: {chromedriverVersion: 86.0.4240.22 (398b0743353ff..., userDataDir: C:\Users\ghaima2\AppData\Lo...}, goog:chromeOptions: {debuggerAddress: localhost:61032}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:virtualAuthenticators: true}
        Session ID: 0617f73a0c455901fdc7800c551f7537
        Stacktrace:
        java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
        org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
        org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
        org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
        org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
        org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
        org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
        org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:84)
        StepImplementation.gotoGetStartedPage(StepImplementation.java:13)
        java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        java.base/java.lang.reflect.Method.invoke(Method.java:566)
        com.thoughtworks.gauge.execution.MethodExecutor.execute(MethodExecutor.java:28)
        com.thoughtworks.gauge.execution.StepExecutionStage.executeStepMethod(StepExecutionStage.java:66)
        com.thoughtworks.gauge.execution.StepExecutionStage.executeStep(StepExecutionStage.java:59)
        com.thoughtworks.gauge.execution.StepExecutionStage.execute(StepExecutionStage.java:41)
        com.thoughtworks.gauge.execution.AbstractExecutionStage.executeNext(AbstractExecutionStage.java:14)
        com.thoughtworks.gauge.execution.HookExecutionStage.execute(HookExecutionStage.java:33)
        com.thoughtworks.gauge.execution.ExecutionPipeline.start(ExecutionPipeline.java:19)
        com.thoughtworks.gauge.processor.ExecuteStepProcessor.process(ExecuteStepProcessor.java:44)
        com.thoughtworks.gauge.RunnerServiceHandler.lambda$executeStep$7(RunnerServiceHandler.java:166)
        java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        java.base/java.lang.Thread.run(Thread.java:834)

[runner: 2]   ## Get Started_2
[runner: 1]   ## Get Started_3
[runner: 2]
        Failed Step: Go to Gauge Get Started Page
        Specification: specs\example.spec:16
        Error Message: org.openqa.selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document
          (Session info: chrome=86.0.4240.198)
        For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/stale_element_reference.html
        Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
        System info: host: 'QAX64VDI0043', ip: '10.71.65.249', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.7'
        Driver info: org.openqa.selenium.chrome.ChromeDriver
        Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 86.0.4240.198, chrome: {chromedriverVersion: 86.0.4240.22 (398b0743353ff..., userDataDir: C:\Users\ghaima2\AppData\Lo...}, goog:chromeOptions: {debuggerAddress: localhost:61032}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:virtualAuthenticators: true}
        Session ID: 0617f73a0c455901fdc7800c551f7537
        Stacktrace:
        java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
        org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
        org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
        org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
        org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
        org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
        org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
        org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:84)
        StepImplementation.gotoGetStartedPage(StepImplementation.java:13)
        java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        java.base/java.lang.reflect.Method.invoke(Method.java:566)
        com.thoughtworks.gauge.execution.MethodExecutor.execute(MethodExecutor.java:28)
        com.thoughtworks.gauge.execution.StepExecutionStage.executeStepMethod(StepExecutionStage.java:66)
        com.thoughtworks.gauge.execution.StepExecutionStage.executeStep(StepExecutionStage.java:59)
        com.thoughtworks.gauge.execution.StepExecutionStage.execute(StepExecutionStage.java:41)
        com.thoughtworks.gauge.execution.AbstractExecutionStage.executeNext(AbstractExecutionStage.java:14)
        com.thoughtworks.gauge.execution.HookExecutionStage.execute(HookExecutionStage.java:33)
        com.thoughtworks.gauge.execution.ExecutionPipeline.start(ExecutionPipeline.java:19)
        com.thoughtworks.gauge.processor.ExecuteStepProcessor.process(ExecuteStepProcessor.java:44)
        com.thoughtworks.gauge.RunnerServiceHandler.lambda$executeStep$7(RunnerServiceHandler.java:166)
        java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        java.base/java.lang.Thread.run(Thread.java:834)

[runner: 2]   ## Get Started_3
[runner: 1]
        Failed Step: Ensure installation instructions are available
        Specification: specs\example1.spec:22
        Error Message: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//a[@href='/writing-specifications.html']"}
          (Session info: chrome=86.0.4240.198)
        For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
        Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
        System info: host: 'QAX64VDI0043', ip: '10.71.65.249', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.7'
        Driver info: org.openqa.selenium.chrome.ChromeDriver
        Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 86.0.4240.198, chrome: {chromedriverVersion: 86.0.4240.22 (398b0743353ff..., userDataDir: C:\Users\ghaima2\AppData\Lo...}, goog:chromeOptions: {debuggerAddress: localhost:61032}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:virtualAuthenticators: true}
        Session ID: 0617f73a0c455901fdc7800c551f7537
        *** Element info: {Using=xpath, value=//a[@href='/writing-specifications.html']}
        Stacktrace:
        java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
        org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
        org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
        org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
        org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
        org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
        org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:323)
        org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:428)
        org.openqa.selenium.By$ByXPath.findElement(By.java:353)
        org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:315)
        StepImplementation.ensureInstallationInstructionsAreAvailable(StepImplementation.java:20)
        java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        java.base/java.lang.reflect.Method.invoke(Method.java:566)
        com.thoughtworks.gauge.execution.MethodExecutor.execute(MethodExecutor.java:28)
        com.thoughtworks.gauge.execution.StepExecutionStage.executeStepMethod(StepExecutionStage.java:66)
        com.thoughtworks.gauge.execution.StepExecutionStage.executeStep(StepExecutionStage.java:59)
        com.thoughtworks.gauge.execution.StepExecutionStage.execute(StepExecutionStage.java:41)
        com.thoughtworks.gauge.execution.AbstractExecutionStage.executeNext(AbstractExecutionStage.java:14)
        com.thoughtworks.gauge.execution.HookExecutionStage.execute(HookExecutionStage.java:33)
        com.thoughtworks.gauge.execution.ExecutionPipeline.start(ExecutionPipeline.java:19)
        com.thoughtworks.gauge.processor.ExecuteStepProcessor.process(ExecuteStepProcessor.java:44)
        com.thoughtworks.gauge.RunnerServiceHandler.lambda$executeStep$7(RunnerServiceHandler.java:166)
        java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        java.base/java.lang.Thread.run(Thread.java:834)

[runner: 1]   ## Get Started_4
[runner: 2]   ## Get Started_4
[runner: 1]   ## Get Started_5
[runner: 2]
        Failed Step: Go to Gauge Get Started Page
        Specification: specs\example.spec:26
        Error Message: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//a[@href='https://docs.gauge.org/getting_started/installing-gauge.html']"}
          (Session info: chrome=86.0.4240.198)
        For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
        Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
        System info: host: 'QAX64VDI0043', ip: '10.71.65.249', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.7'
        Driver info: org.openqa.selenium.chrome.ChromeDriver
        Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 86.0.4240.198, chrome: {chromedriverVersion: 86.0.4240.22 (398b0743353ff..., userDataDir: C:\Users\ghaima2\AppData\Lo...}, goog:chromeOptions: {debuggerAddress: localhost:61032}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:virtualAuthenticators: true}
        Session ID: 0617f73a0c455901fdc7800c551f7537
        *** Element info: {Using=xpath, value=//a[@href='https://docs.gauge.org/getting_started/installing-gauge.html']}
        Stacktrace:
        java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
        org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
        org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
        org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
        org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
        org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
        org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:323)
        org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:428)
        org.openqa.selenium.By$ByXPath.findElement(By.java:353)
        org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:315)
        StepImplementation.gotoGetStartedPage(StepImplementation.java:12)
        java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        java.base/java.lang.reflect.Method.invoke(Method.java:566)
        com.thoughtworks.gauge.execution.MethodExecutor.execute(MethodExecutor.java:28)
        com.thoughtworks.gauge.execution.StepExecutionStage.executeStepMethod(StepExecutionStage.java:66)
        com.thoughtworks.gauge.execution.StepExecutionStage.executeStep(StepExecutionStage.java:59)
        com.thoughtworks.gauge.execution.StepExecutionStage.execute(StepExecutionStage.java:41)
        com.thoughtworks.gauge.execution.AbstractExecutionStage.executeNext(AbstractExecutionStage.java:14)
        com.thoughtworks.gauge.execution.HookExecutionStage.execute(HookExecutionStage.java:33)
        com.thoughtworks.gauge.execution.ExecutionPipeline.start(ExecutionPipeline.java:19)
        com.thoughtworks.gauge.processor.ExecuteStepProcessor.process(ExecuteStepProcessor.java:44)
        com.thoughtworks.gauge.RunnerServiceHandler.lambda$executeStep$7(RunnerServiceHandler.java:166)
        java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        java.base/java.lang.Thread.run(Thread.java:834)

[runner: 2]   ## Get Started_5
[runner: 1]
        Failed Step: Go to Gauge Get Started Page
        Specification: specs\example1.spec:31
        Error Message: org.openqa.selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document
          (Session info: chrome=86.0.4240.198)
        For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/stale_element_reference.html
        Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
        System info: host: 'QAX64VDI0043', ip: '10.71.65.249', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.7'
        Driver info: org.openqa.selenium.chrome.ChromeDriver
        Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 86.0.4240.198, chrome: {chromedriverVersion: 86.0.4240.22 (398b0743353ff..., userDataDir: C:\Users\ghaima2\AppData\Lo...}, goog:chromeOptions: {debuggerAddress: localhost:61032}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:virtualAuthenticators: true}
        Session ID: 0617f73a0c455901fdc7800c551f7537
        Stacktrace:
        java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
        org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
        org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
        org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
        org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
        org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
        org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
        org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:84)
        StepImplementation.gotoGetStartedPage(StepImplementation.java:13)
        java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        java.base/java.lang.reflect.Method.invoke(Method.java:566)
        com.thoughtworks.gauge.execution.MethodExecutor.execute(MethodExecutor.java:28)
        com.thoughtworks.gauge.execution.StepExecutionStage.executeStepMethod(StepExecutionStage.java:66)
        com.thoughtworks.gauge.execution.StepExecutionStage.executeStep(StepExecutionStage.java:59)
        com.thoughtworks.gauge.execution.StepExecutionStage.execute(StepExecutionStage.java:41)
        com.thoughtworks.gauge.execution.AbstractExecutionStage.executeNext(AbstractExecutionStage.java:14)
        com.thoughtworks.gauge.execution.HookExecutionStage.execute(HookExecutionStage.java:33)
        com.thoughtworks.gauge.execution.ExecutionPipeline.start(ExecutionPipeline.java:19)
        com.thoughtworks.gauge.processor.ExecuteStepProcessor.process(ExecuteStepProcessor.java:44)
        com.thoughtworks.gauge.RunnerServiceHandler.lambda$executeStep$7(RunnerServiceHandler.java:166)
        java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        java.base/java.lang.Thread.run(Thread.java:834)

[runner: 1]
[runner: 2]
Successfully generated html-report to => C:\Users\ghaima2\Desktop\Automation\Gauge_Maven_Final_1\gauge_selenium_maven\reports\html-report\index.html

Specifications: 2 executed      0 passed        2 failed        0 skipped
Scenarios:      10 executed     5 passed        5 failed        0 skipped

Total time taken: 21.782s
Updates are available. Run `gauge update -c` for more info.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  35.358 s
[INFO] Finished at: 2020-12-02T14:59:48-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.thoughtworks.gauge.maven:gauge-maven-plugin:1.4.3:execute (default-cli) on project gauge_java_maven_selenium: Gauge Specs execution failed. null: GaugeExecutionFailedException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

------------------------------------------------------------------------------------------------------------------------------------

Gauge version: 1.1.4
Commit Hash: c982558

Plugins
-------
dotnet (0.2.0)
html-report (4.0.12)
java (0.7.13)
json-report (0.3.5)
screenshot (0.0.1)
xml-report (0.2.3)

Webdriver is not thread safe.
The default template at

@Step("Go to Gauge Get Started Page")
public void gotoGetStartedPage() throws InterruptedException {
WebElement getStartedButton = Driver.webDriver.findElement(By.xpath("//a[@href='https://docs.gauge.org/getting_started/installing-gauge.html']"));
getStartedButton.click();
Gauge.writeMessage("Page title is %s", Driver.webDriver.getTitle());
}

is written to be used without multi threading. You will need to modify the code to make it thread safe. You can try asking this at https://spectrum.chat/gauge as there are other people who could share how they run it in a thread safe manner.

@zabil Thanks for your quick response. I have 2 CPU's with each one having 1 core so total 2 cores. Considering same i am running below scenarios. Are they as expected? Please advise.

I have 6 spec files with one scenario in each spec file and multi threading is turned off:

  1. With command "mvn gauge:execute -DspecsDir=specs -DinParallel=true" wherein nodes are not mentioned, it runs on two steams as i have two cores. I am assuming this is correct?

  2. With command "mvn gauge:execute -DspecsDir=specs -DinParallel=true -Dnodes=6" wherein i have mentioned nodes to be 6, it is actually opening 6 different streams. Is this how it should be? I thought it should not go beyond 2 streams as i have only 2 cores in my system. Please advise.

There is info about this here https://docs.gauge.org/execution.html?os=macos&language=python&ide=vscode#parallel-execution

Also mentioned there is

It could lead to undesirable results if the number of streams specified is more than the number of CPU cores available on your system.

@zabil thanks for your response. Yes i did look at the documentation before sending a message, but because it is behaving differently than what is mentioned in the documentation so thought of clarifying with you. It would be helpful if you can look at below points 1 and 2 and provide your inputs.

I have 2 CPU's with each one having 1 core so total 2 cores. Considering same i am running below scenarios. Are they as expected? Please advise.

I have 6 spec files with one scenario in each spec file and multi threading is turned off:

  1. With command "mvn gauge:execute -DspecsDir=specs -DinParallel=true" wherein nodes are not mentioned, it runs on two steams as i have two cores. I am assuming this is correct?

  2. With command "mvn gauge:execute -DspecsDir=specs -DinParallel=true -Dnodes=6" wherein i have mentioned nodes to be 6, it is actually opening 6 different streams. Is this how it should be? I thought it should not go beyond 2 streams as i have only 2 cores in my system. Please advise.

With command "mvn gauge:execute -DspecsDir=specs -DinParallel=true" wherein nodes are not mentioned, it runs on two steams as i have two cores. I am assuming this is correct?

Yes

With command "mvn gauge:execute -DspecsDir=specs -DinParallel=true -Dnodes=6" wherein i have mentioned nodes to be 6, it is actually opening 6 different streams. Is this how it should be? I thought it should not go beyond 2 streams as i have only 2 cores in my system. Please advise.

Yes, it will try to the number of streams mentioned in the nodes=6 parameter, however this is unpredicatable as the number of streams should not be more than the number of cores. Nodes can be used rather for not defaulting to use all the cores in a paraller run (for example use 2 out of 4 cores)

This is also discussed here https://groups.google.com/u/1/g/getgauge/c/jUhZeOgJpNs/m/y42CXTzYAQAJ

@zabil Thanks Zabil got it.