Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests are not running on sauce lab with serenity v2.5.8 #2586

Open
sumit-global opened this issue Oct 21, 2021 · 17 comments
Open

Tests are not running on sauce lab with serenity v2.5.8 #2586

sumit-global opened this issue Oct 21, 2021 · 17 comments

Comments

@sumit-global
Copy link

After updating to v2.5.8 seems tests are no longer running on sauce, updated serenity.properties as per "https://docs.saucelabs.com/dev/test-configuration-options/index.html" as mentioned in "https://github.com/serenity-bdd/serenity-core/tree/master/serenity-saucelabs#saucelabs-integration-plugin" seems all properties mentioned are silently ignored.

Document(https://serenity-bdd.github.io/theserenitybook/latest/index.html) is also not updated with latest configuration required to run cases on saucelabs

@wakaleo
Copy link
Member

wakaleo commented Oct 21, 2021

Serenity tests run fine on Saucelabs and other remote platforms. Have a look at https://github.com/serenity-bdd/serenity-core/blob/master/serenity-smoketests/src/test/resources/serenity.conf for a live example.

@sumit-global
Copy link
Author

HI John,

Thanks for reply, I followed same steps, please find maven goal below:

clean verify -Dwebdriver.driver=remote -Dsaucelabs.browserName="Safari" -Dsaucelabs.browserVersion="12" -Dsaucelabs.platformName="macOS 10.14" -Dinjected.tags="browser:Safari" -Dcontext=Safari -Denvironment=dev -Dwebdriver.remote.url=https://ondemand.us-west-1.saucelabs.com/wd/hub -Dsaucelabs.accessKey= -Dsaucelabs.username= -Dcucumber.filter.tags="@test" -Dsaucelabs.tunnelName="TUNNELNAME" -Dsaucelabs.tunnelOwner="TUNNELOWNER" -Dsaucelabs.name="TEST_Flow" -Ddatacenter="us-west-1"

Still enable to launch webdriver.

@wakaleo
Copy link
Member

wakaleo commented Oct 21, 2021

Are you saying that a normal webdriver instance is being run instead of the remote one?

@sumit-global
Copy link
Author

sumit-global commented Oct 21, 2021

No John, I am getting exception as below:

Caused by: net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate new WebDriver instance of type class org.openqa.selenium.remote.RemoteWebDriver (Unable to parse remote response: No browserName or device specified in session request. Please check our platforms documentation (https://saucelabs.com/docs/platforms): {'wait.for.timeout': 40000, 'remote.url': 'https://XXXX:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX@ondemand.us-west-1.saucelabs.com:443/wd/hub', 'idle-timeout': 180, 'edge.driver': 'msedgedriver.exe', 'driver': 'remote', 'autodownload': False}). See below for more details.

Before upgrading it was working fine without any issue on saucelab

@sumit-global
Copy link
Author

One more observation if I set
-Dwebdriver.driver="Safari" instead of "remote" and -Dwebdriver.remote.url=https://XXXX:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX@ondemand.us-west-1.saucelabs.com:443/wd/hub instead of "https://ondemand.us-west-1.saucelabs.com/wd/hub" it launched some random version of mac and safari on sauce but fails to open web page.

@wakaleo
Copy link
Member

wakaleo commented Oct 21, 2021

That sounds like a Saucelabs configuration issue, not a Serenity one.

@sumit-global
Copy link
Author

Seems it's an issue with serenity as browserName valued is ignored by serenity

@wakaleo
Copy link
Member

wakaleo commented Oct 21, 2021

In that case, if it's urgent, debug the code and see what it is doing, and if you find an issue, propose a PR. Also have a look at the smoke test config - we use the browserName there.

@sumit-global
Copy link
Author

Sure John, let me debug and share results

@sumit-global
Copy link
Author

Hi John,

I figured out it's an issue with serenity-saucelabs dependency, now I am able to run test-cases on saucelabs..

Just want to add 1 more observation that after upgrade cases are running too slow on sauce lab as compared with earlier version

@wakaleo
Copy link
Member

wakaleo commented Oct 22, 2021

What do you notice that is slow compared to previous versions?

@sumit-global
Copy link
Author

sumit-global commented Oct 22, 2021

Hi John,

What I observed that there are multiple call for "POST execute/sync" for each element, refer below:

POST execute/sync
PARAMETERS
{
"args": [],
"script": "return (typeof jQuery === 'function')"
}

Which increasing the execution time.

@wakaleo
Copy link
Member

wakaleo commented Oct 22, 2021

Thanks, let me investigate further.

@sumit-global
Copy link
Author

Thanks John for heads up!!

@wakaleo
Copy link
Member

wakaleo commented Feb 12, 2022

Is this still happening in version 3.2.0?

@Jordanlosa97
Copy link

Hi, do you know if this still happening on new versions ?
This is increasing too much the execution time (at least three times than local executions), but it just is happening with sauceLabs
I am using Serenity 2.4.34
image

@wakaleo
Copy link
Member

wakaleo commented Aug 4, 2022

Try with version 3.3.1 and refer to the docs as to how to configure Saucelabs using the W3C properties: https://serenity-bdd.github.io/documentation/docs/cloud/saucelabs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants