diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 2067779c7b..8d3443731a 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -268,7 +268,7 @@ jobs: echo No SAUCELABS_USER and/or SAUCELABS_KEY, SauceLabs system tests will be skipped fi - - name: SauceLabs - Phone - Web - System tests + - name: SauceLabs - Mobile - Web - System tests if: matrix.platform == 'ubuntu-latest' env: SAUCELABS_USER: ${{ secrets.SAUCELABS_USER }} @@ -276,11 +276,11 @@ jobs: shell: bash run: | if [[ -n $SAUCELABS_USER && -n $SAUCELABS_KEY ]]; then - declare -a profiles=( iphone ) + declare -a profiles=( iphone android) for profile in "${profiles[@]}"; do ./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments=system/saucelabs \ - -Pvividus.configuration.suites=grid \ - -Pvividus.configuration.profiles=saucelabs/web,web/phone/${profile} \ + -Pvividus.configuration.suites=grid/saucelabs/${profile} \ + -Pvividus.configuration.profiles=saucelabs/web/phone/${profile},web/phone/${profile} \ -Pvividus.selenium.grid.username=${SAUCELABS_USER} \ -Pvividus.selenium.grid.password=${SAUCELABS_KEY} done @@ -288,6 +288,44 @@ jobs: echo No SAUCELABS_USER and/or SAUCELABS_KEY, SauceLabs system tests will be skipped fi + - name: BrowserStack - Mobile - Web - System tests + if: matrix.platform == 'macos-latest' + env: + BROWSERSTACK_USER: ${{ secrets.BROWSERSTACK_USER }} + BROWSERSTACK_KEY: ${{ secrets.BROWSERSTACK_KEY }} + shell: bash + run: | + if [[ -n $BROWSERSTACK_USER && -n $BROWSERSTACK_KEY ]]; then + declare -a profiles=( iphone android ) + for profile in "${profiles[@]}"; do + ./gradlew :vividus-tests:debugStories -Pvividus.configuration.suites=grid/browserstack/${profile} \ + -Pvividus.configuration.profiles=browserstack/web/phone,web/phone/${profile} \ + -Pvividus.selenium.grid.username=${BROWSERSTACK_USER} \ + -Pvividus.selenium.grid.password=${BROWSERSTACK_KEY} + done + else + echo No BROWSERSTACK_USER and/or BROWSERSTACK_KEY, Browserstack phone system tests will be skipped + fi + + - name: Mobitru - Mobile - Web - System tests + if: matrix.platform == 'macos-latest' + env: + MOBITRU_USER: ${{ secrets.MOBITRU_USER }} + MOBITRU_KEY: ${{ secrets.MOBITRU_KEY }} + shell: bash + run: | + if [[ -n $MOBITRU_USER && -n $MOBITRU_KEY ]]; then + declare -a profiles=( iphone android ) + for profile in "${profiles[@]}"; do + ./gradlew :vividus-tests:debugStories -Pvividus.configuration.suites=grid \ + -Pvividus.configuration.profiles=mobitru/web,web/phone/${profile} \ + -Pvividus.selenium.grid.username=${MOBITRU_USER} \ + -Pvividus.selenium.grid.password=${MOBITRU_KEY} + done + else + echo No MOBITRU_USER and/or MOBITRU_KEY, Mobitru web mobile system tests will be skipped + fi + - name: SauceLabs - iOS - Mobile App - Run system tests (Downscaled) if: matrix.platform == 'ubuntu-latest' env: @@ -624,7 +662,7 @@ jobs: if [[ -n $MOBITRU_USER && -n $MOBITRU_KEY ]]; then ./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments= \ -Pvividus.configuration.suites=system/mobile_app/healthcheck/mobitru \ - -Pvividus.configuration.profiles=mobitru,mobile_app/android \ + -Pvividus.configuration.profiles=mobitru/mobile_app,mobile_app/android \ -Pvividus.selenium.grid.username=${MOBITRU_USER} \ -Pvividus.selenium.grid.password=${MOBITRU_KEY} \ -Pvividus.selenium.grid.capabilities.platformVersion=12 \ @@ -661,7 +699,7 @@ jobs: if [[ -n $MOBITRU_USER && -n $MOBITRU_KEY ]]; then ./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments= \ -Pvividus.configuration.suites=system/mobile_app/healthcheck/mobitru \ - -Pvividus.configuration.profiles=mobitru,mobile_app/ios \ + -Pvividus.configuration.profiles=mobitru/mobile_app,mobile_app/ios \ -Pvividus.selenium.grid.username=${MOBITRU_USER} \ -Pvividus.selenium.grid.password=${MOBITRU_KEY} \ -Pvividus.allure.history-directory=output/history/mt-ios-system-tests \ diff --git a/docs/modules/plugins/pages/plugin-browserstack.adoc b/docs/modules/plugins/pages/plugin-browserstack.adoc index fcaf6de353..023b9cab24 100644 --- a/docs/modules/plugins/pages/plugin-browserstack.adoc +++ b/docs/modules/plugins/pages/plugin-browserstack.adoc @@ -13,7 +13,13 @@ The plugin defines profiles with a set of the preconfigured properties. |=== |`browserstack/web` -|Use in conjunction with web application profiles. +|Use in conjunction with xref:plugins:plugin-web-app.adoc#_desktop[web application profiles]. + +|`browserstack/web/phone` +a|Use in conjunction with xref:plugins:plugin-web-app.adoc#_phone[web application phone profiles]. +Required properties: + +* `selenium.grid.device-name` |`browserstack/mobile_app` a|Use in conjunction with xref:plugins:plugin-mobile-app.adoc#_profiles[native mobile application profiles]. diff --git a/docs/modules/plugins/pages/plugin-mobitru.adoc b/docs/modules/plugins/pages/plugin-mobitru.adoc index b6b4e16b18..943ef042ed 100644 --- a/docs/modules/plugins/pages/plugin-mobitru.adoc +++ b/docs/modules/plugins/pages/plugin-mobitru.adoc @@ -17,7 +17,10 @@ IMPORTANT: For the device search plugin relies on the capabilities specified in [cols="1,2"] |=== -|`mobitru` +|`mobitru/web` +|Use in conjunction with xref:plugins:plugin-web-app.adoc#_phone[web application phone profiles]. + +|`mobitru/mobile_app` |Use in conjunction with xref:plugins:plugin-mobile-app.adoc#_profiles[native mobile application profiles]. |=== diff --git a/docs/modules/plugins/pages/plugin-sauce-labs.adoc b/docs/modules/plugins/pages/plugin-sauce-labs.adoc index 864bf0dbd8..92f6f97bfa 100644 --- a/docs/modules/plugins/pages/plugin-sauce-labs.adoc +++ b/docs/modules/plugins/pages/plugin-sauce-labs.adoc @@ -13,7 +13,23 @@ The plugin defines profiles with a set of the preconfigured properties. |=== |`saucelabs/web` -|Use in conjunction with web application profiles. +|Use in conjunction with xref:plugins:plugin-web-app.adoc#_desktop[web application profiles]. + +|`saucelabs/web/phone/iphone` +a|Use in conjunction with xref:plugins:plugin-web-app.adoc#_phone[web application phone profiles]. + +Required properties: + +* `selenium.grid.device-name` +* `selenium.grid.platform-version` + +|`saucelabs/web/phone/android` +a|Use in conjunction with xref:plugins:plugin-web-app.adoc#_phone[web application phone profiles]. + +Required properties: + +* `selenium.grid.device-name` +* `selenium.grid.platform-version` |`saucelabs/mobile_app` a|Use in conjunction with xref:plugins:plugin-mobile-app.adoc#_profiles[native mobile application profiles]. diff --git a/vividus-plugin-browserstack/src/main/resources/properties/profile/browserstack/web/phone/profile.properties b/vividus-plugin-browserstack/src/main/resources/properties/profile/browserstack/web/phone/profile.properties new file mode 100644 index 0000000000..98266beec4 --- /dev/null +++ b/vividus-plugin-browserstack/src/main/resources/properties/profile/browserstack/web/phone/profile.properties @@ -0,0 +1,3 @@ +# Not required to run web mobile tests. +selenium.grid.platform-version= +selenium.grid.capabilities.bstack\:options.deviceName=${selenium.grid.device-name} diff --git a/vividus-plugin-mobitru/src/main/resources/properties/profile/mobitru/mobile_app/profile.properties b/vividus-plugin-mobitru/src/main/resources/properties/profile/mobitru/mobile_app/profile.properties new file mode 100644 index 0000000000..f92587c43d --- /dev/null +++ b/vividus-plugin-mobitru/src/main/resources/properties/profile/mobitru/mobile_app/profile.properties @@ -0,0 +1,5 @@ +spring.profiles.active=mobile_app,mobitru + +selenium.grid.capabilities.automationName=${selenium.grid.automation-name} + +mobitru.device-wait-timeout=PT5M diff --git a/vividus-plugin-mobitru/src/main/resources/properties/profile/mobitru/profile.properties b/vividus-plugin-mobitru/src/main/resources/properties/profile/mobitru/profile.properties index e6788f5b1f..4428ae02de 100644 --- a/vividus-plugin-mobitru/src/main/resources/properties/profile/mobitru/profile.properties +++ b/vividus-plugin-mobitru/src/main/resources/properties/profile/mobitru/profile.properties @@ -1,9 +1,4 @@ -spring.profiles.active=mobile_app,mobitru - selenium.grid.enabled=true selenium.grid.host=app.mobitru.com selenium.grid.url=https://${selenium.grid.username}:#{T(java.net.URLEncoder).encode('${selenium.grid.password}', T(java.nio.charset.StandardCharsets).UTF_8)}@${selenium.grid.host}/wd/hub -selenium.grid.capabilities.automationName=${selenium.grid.automation-name} selenium.grid.capabilities.platformName=${selenium.grid.platform-name} - -mobitru.device-wait-timeout=PT5M diff --git a/vividus-plugin-mobitru/src/main/resources/properties/profile/mobitru/web/profile.properties b/vividus-plugin-mobitru/src/main/resources/properties/profile/mobitru/web/profile.properties new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/vividus-plugin-mobitru/src/main/resources/properties/profile/mobitru/web/profile.properties @@ -0,0 +1 @@ + diff --git a/vividus-plugin-saucelabs/src/main/resources/properties/profile/saucelabs/web/phone/android/profile.properties b/vividus-plugin-saucelabs/src/main/resources/properties/profile/saucelabs/web/phone/android/profile.properties new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/vividus-plugin-saucelabs/src/main/resources/properties/profile/saucelabs/web/phone/android/profile.properties @@ -0,0 +1 @@ + diff --git a/vividus-plugin-saucelabs/src/main/resources/properties/profile/saucelabs/web/phone/iphone/profile.properties b/vividus-plugin-saucelabs/src/main/resources/properties/profile/saucelabs/web/phone/iphone/profile.properties new file mode 100644 index 0000000000..6ecdfb1c34 --- /dev/null +++ b/vividus-plugin-saucelabs/src/main/resources/properties/profile/saucelabs/web/phone/iphone/profile.properties @@ -0,0 +1,3 @@ +# Simulator only capabilities +selenium.grid.capabilities.safariIgnoreFraudWarning=true +selenium.grid.capabilities.safariAllowPopups=true diff --git a/vividus-plugin-saucelabs/src/main/resources/properties/profile/saucelabs/web/phone/profile.properties b/vividus-plugin-saucelabs/src/main/resources/properties/profile/saucelabs/web/phone/profile.properties new file mode 100644 index 0000000000..cca50652bc --- /dev/null +++ b/vividus-plugin-saucelabs/src/main/resources/properties/profile/saucelabs/web/phone/profile.properties @@ -0,0 +1,2 @@ +selenium.grid.capabilities.appium\:deviceName=${selenium.grid.device-name} +selenium.grid.capabilities.appium\:platformVersion=${selenium.grid.platform-version} diff --git a/vividus-plugin-web-app/src/main/resources/properties/profile/web/phone/android/profile.properties b/vividus-plugin-web-app/src/main/resources/properties/profile/web/phone/android/profile.properties index 7bf546b9e4..a984d439a2 100644 --- a/vividus-plugin-web-app/src/main/resources/properties/profile/web/phone/android/profile.properties +++ b/vividus-plugin-web-app/src/main/resources/properties/profile/web/phone/android/profile.properties @@ -1,4 +1,5 @@ -selenium.grid.capabilities.platform=Android -selenium.grid.capabilities.platformName=${selenium.grid.capabilities.platform} +selenium.grid.platform-name=Android +selenium.grid.capabilities.platformName=${selenium.grid.platform-name} +selenium.grid.capabilities.browserName=Chrome selenium.screenshot.strategy=PHONE_ANDROID_PORTRAIT diff --git a/vividus-plugin-web-app/src/main/resources/properties/profile/web/phone/iphone/profile.properties b/vividus-plugin-web-app/src/main/resources/properties/profile/web/phone/iphone/profile.properties index f03f44e25e..1b21654b14 100644 --- a/vividus-plugin-web-app/src/main/resources/properties/profile/web/phone/iphone/profile.properties +++ b/vividus-plugin-web-app/src/main/resources/properties/profile/web/phone/iphone/profile.properties @@ -1,11 +1,6 @@ -selenium.grid.capabilities.platform=iOS -selenium.grid.capabilities.platformName=${selenium.grid.capabilities.platform} -selenium.grid.capabilities.platformVersion=14.0 -selenium.grid.capabilities.deviceName=iPhone Simulator +selenium.grid.platform-name=iOS +selenium.grid.capabilities.platformName=${selenium.grid.platform-name} selenium.grid.capabilities.browserName=Safari -selenium.grid.capabilities.safariIgnoreFraudWarning=true -selenium.grid.capabilities.safariAllowPopups=true -#selenium.grid.capabilities.unexpectedAlertBehaviour=accept selenium.grid.capabilities.screenshotWaitTimeout=20 diff --git a/vividus-tests/src/main/resources/properties/suite/grid/browserstack/android/suite.properties b/vividus-tests/src/main/resources/properties/suite/grid/browserstack/android/suite.properties new file mode 100644 index 0000000000..f7edf5ead3 --- /dev/null +++ b/vividus-tests/src/main/resources/properties/suite/grid/browserstack/android/suite.properties @@ -0,0 +1 @@ +selenium.grid.device-name=Samsung Galaxy S22 Ultra diff --git a/vividus-tests/src/main/resources/properties/suite/grid/browserstack/iphone/suite.properties b/vividus-tests/src/main/resources/properties/suite/grid/browserstack/iphone/suite.properties new file mode 100644 index 0000000000..3fc8d4195d --- /dev/null +++ b/vividus-tests/src/main/resources/properties/suite/grid/browserstack/iphone/suite.properties @@ -0,0 +1 @@ +selenium.grid.device-name=iPhone 14 diff --git a/vividus-tests/src/main/resources/properties/suite/grid/saucelabs/android/suite.properties b/vividus-tests/src/main/resources/properties/suite/grid/saucelabs/android/suite.properties new file mode 100644 index 0000000000..6b34b81c75 --- /dev/null +++ b/vividus-tests/src/main/resources/properties/suite/grid/saucelabs/android/suite.properties @@ -0,0 +1,2 @@ +selenium.grid.device-name=Android GoogleAPI Emulator +selenium.grid.platform-version=12 diff --git a/vividus-tests/src/main/resources/properties/suite/grid/saucelabs/iphone/suite.properties b/vividus-tests/src/main/resources/properties/suite/grid/saucelabs/iphone/suite.properties new file mode 100644 index 0000000000..e85bc0c4d9 --- /dev/null +++ b/vividus-tests/src/main/resources/properties/suite/grid/saucelabs/iphone/suite.properties @@ -0,0 +1,2 @@ +selenium.grid.device-name=iPhone Simulator +selenium.grid.platform-version=14.0