serenity-bdd / serenity-core

Serenity BDD is a test automation library designed to make writing automated acceptance tests easier, and more fun.
http://serenity-bdd.info
Other
722 stars 518 forks source link

Serenity BDD Tests Stuck in GitHub Actions and Jenkins Parallel Execution #3420

Open shrutigupta123 opened 8 months ago

shrutigupta123 commented 8 months ago

When running Serenity BDD version 3.3.10 tests with Maven Failsafe plugin for parallel execution on Sauce Labs, I encountered a discrepancy in execution time between GitHub Actions/Jenkins and local execution. Specifically, when running tests with 14 threads in parallel, the execution completes promptly on Sauce Labs but gets stuck for an extended period on GitHub Actions and Jenkins.

Error Logs I get while the test is stuck:

Build info: version: '4.5.3'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-1160.105.1.el7.x86_64', java.version: '1.8.0_402'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [7ae1a45054a5f8ca5, findElements {using=xpath, value=//span[@class='select-menu-item-text']}]
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 122.0.6261.70, chrome: {chromedriverVersion: 127.1.725.69 (81bc56a36..., userDataDir: C:\Program Files (x86)\scop...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:49834}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: WINDOWS, proxy: Proxy(pac: http://127.0.0.1/..., setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
Session ID: cugfkj4a5f8ca5trying to click again
20:20:18.668 [pool-2-thread-11] INFO  c.a.c.p.github.GitHubRepoFeaturePage - Caught error: org.openqa.selenium.NoSuchSessionException: failed serving request POST /wd/hub/session/a4278c348ca5/elements: session not found or finished

Note: I have tried adjusting various parameters such as thread count, Maven settings, and execution environment. Notably, the issue does not occur when running tests with 8 threads in parallel. However, it consistently arises with 14 threads, impacting the scalability and efficiency of our CI/CD pipeline.

Any insights or guidance on resolving this issue would be greatly appreciated.

wakaleo commented 8 months ago

Hard to say. Could be an issue with the Saucelabs session timing out.