Skip to content
New issue

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

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

Already on GitHub? # to your account

Transfer web proxy steps to extension-selenium #2256

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,44 @@ jobs:
name: SauceLabs - System Tests - Allure report - iOS
path: vividus-tests/output/reports/sl-ios-allure

- name: SauceLabs - iOS Proxy- Mobile App - Run system tests
if: matrix.platform == 'ubuntu-latest'
env:
SAUCELABS_USER: ${{ secrets.SAUCELABS_USER }}
SAUCELABS_KEY: ${{ secrets.SAUCELABS_KEY }}
shell: bash
run: |
if [[ -n $SAUCELABS_USER && -n $SAUCELABS_KEY ]]; then
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments=system/saucelabs/mobile_app/ios \
-Pvividus.configuration.suites= \
-Pvividus.configuration.profiles=saucelabs/mobile_app,mobile_app/ios \
-Pvividus.bdd.story-loader.batch-1.resource-location=story/system/mobile_app \
-Pvividus.bdd.story-loader.batch-1.resource-include-patterns=ProxyMobileStepsTests.story \
-Pvividus.selenium.grid.username=${SAUCELABS_USER} \
-Pvividus.selenium.grid.password=${SAUCELABS_KEY} \
-Pvividus.allure.history-directory=output/history/sl-ios-proxy-system-tests \
-Pvividus.allure.report-directory=output/reports/sl-ios-proxy-allure \
-Pvividus.allure.executor.name="Github Actions (Vividus)" \
-Pvividus.allure.executor.type=github \
-Pvividus.allure.executor.url=https://github.com/vividus-framework/vividus/actions \
-Pvividus.allure.executor.build-order=${GITHUB_RUN_ID} \
-Pvividus.allure.executor.build-name="SauceLabs iOS Proxy Tests ${GITHUB_RUN_ID}" \
-Pvividus.allure.executor.build-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-name="SauceLabs iOS Proxy tests report" \
-Pvividus.saucelabs.sauce-connect.command-line-arguments="--proxy-localhost --no-ssl-bump-domains example.com" \
-Pvividus.bdd.variables.global.app-url=sauce-storage:vividus-test-app-ios.zip
else
echo No SAUCELABS_USER and/or SAUCELABS_KEY variables, System tests will be skipped
fi

- name: SauceLabs - iOS Proxy - Mobile App - Publish system tests report
if: matrix.platform == 'ubuntu-latest' && always()
uses: actions/upload-artifact@v2
with:
name: SauceLabs - System Tests With Proxy- Allure report - iOS
path: vividus-tests/output/reports/sl-ios-proxy-allure

- name: SauceLabs - Android - Mobile App - Run system tests
if: matrix.platform == 'ubuntu-latest'
env:
Expand Down Expand Up @@ -328,6 +366,44 @@ jobs:
name: SauceLabs - System Tests - Allure report - Android
path: vividus-tests/output/reports/sl-android-allure

- name: SauceLabs - Android Proxy- Mobile App - Run system tests
if: matrix.platform == 'ubuntu-latest'
env:
SAUCELABS_USER: ${{ secrets.SAUCELABS_USER }}
SAUCELABS_KEY: ${{ secrets.SAUCELABS_KEY }}
shell: bash
run: |
if [[ -n $SAUCELABS_USER && -n $SAUCELABS_KEY ]]; then
./gradlew :vividus-tests:debugStories -Pvividus.configuration.environments=system/saucelabs/mobile_app/android \
-Pvividus.configuration.suites= \
-Pvividus.configuration.profiles=saucelabs/mobile_app,mobile_app/android \
-Pvividus.bdd.story-loader.batch-1.resource-location=story/system/mobile_app \
-Pvividus.bdd.story-loader.batch-1.resource-include-patterns=ProxyMobileStepsTests.story \
-Pvividus.selenium.grid.username=${SAUCELABS_USER} \
-Pvividus.selenium.grid.password=${SAUCELABS_KEY} \
-Pvividus.allure.history-directory=output/history/sl-android-proxy-system-tests \
-Pvividus.allure.report-directory=output/reports/sl-android-proxy-allure \
-Pvividus.allure.executor.name="Github Actions (Vividus)" \
-Pvividus.allure.executor.type=github \
-Pvividus.allure.executor.url=https://github.com/vividus-framework/vividus/actions \
-Pvividus.allure.executor.build-order=${GITHUB_RUN_ID} \
-Pvividus.allure.executor.build-name="SauceLabs Android Proxy Tests ${GITHUB_RUN_ID}" \
-Pvividus.allure.executor.build-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-name="SauceLabs Android Proxy tests report" \
-Pvividus.saucelabs.sauce-connect.command-line-arguments="--proxy-localhost --no-ssl-bump-domains example.com" \
-Pvividus.bdd.variables.global.app-url=sauce-storage:vividus-test-app-android.zip
else
echo No SAUCELABS_USER and/or SAUCELABS_KEY variables, System tests will be skipped
fi

- name: SauceLabs - Android Proxy - Mobile App - Publish system tests report
if: matrix.platform == 'ubuntu-latest' && always()
uses: actions/upload-artifact@v2
with:
name: SauceLabs - System Tests With Proxy- Allure report - Android
path: vividus-tests/output/reports/sl-android-proxy-allure

- name: BrowserStack - Desktop - Web - System tests
if: matrix.platform == 'macos-latest'
env:
Expand Down
9 changes: 8 additions & 1 deletion docs/modules/plugins/pages/plugin-mobile-app.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
:grid-default-hostname: empty
:keys: https://github.com/appium/appium-xcuitest-driver#mobile-pressbutton[iOS keys] or https://appium.github.io/java-client/io/appium/java_client/android/nativekey/AndroidKey.html[Android keys]
:given-step: Given I start mobile application

= Mobile Application Plugin

Expand Down Expand Up @@ -161,9 +162,13 @@ a|Defines a destination folder on a device for a file being uploaded
!`/sdcard/Pictures`

!===

include::partial$proxy-properties.adoc[]
|===

include::partial$proxy-meta-tags.adoc[]

IMPORTANT: For device configuration, we need to perform the following steps: install CA certificate(download https://github.com/browserup/browserup-proxy/blob/master/browserup-proxy-core/src/main/resources/sslSupport/ca-certificate-rsa.cer[CA certificate] from a browserup repository), configure device proxy, and configure the test app to allow proxy in cases of necessity.

== Profiles

=== iOS
Expand Down Expand Up @@ -744,3 +749,5 @@ When I select next value with `0.1` offset in picker wheel located `xpath(//XCUI


include::partial$generic-ui-steps.adoc[]

include::partial$proxy-steps.adoc[]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should put some extra info, that proxy is not supported by Appium and custom solutions are needed

Loading