Xceptance / neodymium-library

A test automation library based on common other best practice open source libraries. It adds missing functionalities but does not reinvent the wheel. Just glues stuff together nicely and adds some sprinkles.
MIT License
80 stars 11 forks source link

Research supporting BrowserStack as new test environment #158

Closed occupant23 closed 4 months ago

occupant23 commented 3 years ago

We already documented the differences between SauceLabs and TestingBot within the documentation: https://github.com/Xceptance/neodymium-library/wiki/Test-Environments#browser-specific-test-environment-configuration

We would need a list that covers if the already supported configurations/capabilities are available/supported. Furthermore if the naming is different to SauceLabs a list of differences would be nice, so that the adjustment will be faster.

You can find the BrowserStack documentation here: https://www.browserstack.com/docs/automate/selenium/getting-started/java/junit Under the "WRITING YOUR TESTS" section within the sidebar you can find the different capabilities. I saw there is also a capabilities generator on the site, maybe this can also help.

rkl-xc commented 3 years ago
Property name Type Usage BrowserStack
browserName String list of browsers see [6] supported (alt: browser) [1]
deviceName String list of devices see [6] renamed: "device" [1]
deviceOrientation String portrait, landscape (default) supported [2]
idleTimeout int default: 900s supported [3]
maxDuration - fix value not supported: 2h fix [4]
platformName String supported, but better to translate os, os_version renamed: "platform", (alt: os) [1]
screenResolution String width and height separated by x e.g. "1200x900" renamed: "resolution" [3] [5]
seleniumVersion String list of versions see [3] supported [3]
version String browser_version is preferred supported [1]
acceptInsecureCertificates Boolean true: ignores invalid certificates [3] renamed: "acceptSslCerts" [3]

sources to refer to: [1] https://www.browserstack.com/docs/automate/selenium/select-browsers-and-devices [2] https://www.browserstack.com/docs/automate/selenium/change-device-orientation [3] https://www.browserstack.com/automate/capabilities?tag=selenium-4 [4] https://www.browserstack.com/docs/app-automate/xcuitest/timeouts#session-limit-reached [5] https://www.browserstack.com/docs/automate/selenium/change-screen-resolution [6] https://www.browserstack.com/list-of-browsers-and-platforms/automate

rkl-xc commented 3 years ago

I opened a free BrowserStack account, implemented and tested the changes. Please review.

occupant23 commented 3 years ago

Code is merged into development.

@rkl-xc : Please extend the documentation (dev branch) with another column containing the BrowserStack specific information.

occupant23 commented 3 years ago

@oomelianchuk Please test this feature. Contact me for credentials.

oomelianchuk commented 3 years ago

The feature works as expected. I was able to configure test to run on iPhone12, Samsung Galaxy S20 and Chrome latest version on Windows 10 with following configurations:

browserprofile.iPhone12.name = iPhone12
browserprofile.iPhone12.browserName = iphone12
browserprofile.iPhone12.platformName = 14
browserprofile.iPhone12.deviceName = iPhone 12
browserprofile.iPhone12.deviceOrientation = portrait
browserprofile.iPhone12.testEnvironment = browserstack

browserprofile.SamsungGalaxyS20.name = Samsung Galaxy S20
browserprofile.SamsungGalaxyS20.platformName = 10.0
browserprofile.SamsungGalaxyS20.deviceName = Samsung Galaxy S20
browserprofile.SamsungGalaxyS20.deviceOrientation = portrait
browserprofile.SamsungGalaxyS20.testEnvironment = browserstack

browserprofile.Windows10Chrome_latest.name = Windows 10 Chrome latest
browserprofile.Windows10Chrome_latest.browserName = Chrome
browserprofile.Windows10Chrome_latest.browserVersion = latest
browserprofile.Windows10Chrome_latest.platformName = Windows
browserprofile.Windows10Chrome_latest.osVersion = 10
browserprofile.Windows10Chrome_latest.seleniumVersion = 3.14.0
browserprofile.Windows10Chrome_latest.testEnvironment = browserstack

BTW, I haven't found Neodymium documentation update for this feature, was I just looking at the wrong place?

oomelianchuk commented 3 years ago

Documentation extended

AJakobi commented 4 months ago

Already in master...closing ticket