[Mobile] Appium 2 Migration#55166
Merged
Merged
Conversation
added 17 commits
October 6, 2023 12:05
- Bumps Appium to version 2.0.0 - Removes wd in favor of WebdriverIO
- Updates test:e2e:build-wda with the new Appium home path for the xcuitest driver. - Updates test:e2e:android:local and test:e2e:ios:local to add the newly added appium:setup script to install drivers if needed.
- Move the Launch of the simulator step to the top so it starts booting up the simulator in the background, so it doesn't block the next steps while it's stating. - Install and cache the Appium drivers.
- It removes unneeded values after the migration. - Bumps the iOS platform version to 16.2. - Adds specific SauceLabs configuration that sets the Appium version to 2.0.0. - Adds a prefixKeysWithAppium util to append the "appium:" prefix for the Appium capabilities settings. This is added to simplify the modifications we do for some of the settings in runtime.
…s for Appium 2 and WebdriverIO
- Remove import of wd and set it as null temporarily while we migrate its usage to WebdriverIO
Update getIOSPlatformVersions to get the desired platform version from the capabilities settings instead of an inline value
- Update Remote configuration with the new structure for WebdriverIO and Appium 2 - Uses the prefixKeysWithAppium util for the Appium capabilities, we cannot use "appium:options" since that's only available for real devices and we use simulators instead. - The app capability value was updated to the new storage:filename= prefix this was important to make SauceLabs to work correctly
- Changes sessionID to sessionId - Removes the hash value to append in the Job URL, these URLs are public so it's not needed to append the auth param. - Updates driver.quit() to driver.deleteSession()
It adds a custom timeout to waitForDisplayed, the simulators in CI are slow so we need to give enough time to find the post title locator.
…te to WebdriverIO
|
Size Change: -857 B (0%) Total Size: 1.69 MB
ℹ️ View Unchanged
|
geriux
commented
Oct 9, 2023
geriux
commented
Oct 9, 2023
geriux
commented
Oct 9, 2023
geriux
commented
Oct 9, 2023
|
Flaky tests detected in 52b04f1. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6627808133
|
dcalhoun
reviewed
Oct 9, 2023
dcalhoun
left a comment
Member
There was a problem hiding this comment.
Thank you for setting this up!
I recognize this is a WIP, leaving a few thoughts for consideration.
… also updates the logic to the latest implementation from SauceLabs docs.
* Improve Screenrecording on Android by making sure of the following: The sdcard folder should exist in the emulator, if not there's a script that will create it. For skipped tests, it will remove empty folders that weren't needed. When having multiple Android emulators opened, it will use the deviceID that Appium is currently using. * Rename getAndroidDeviceID function to getDeviceID since it's not platform specific * Fix comment * Temp: log session * Use adb devices list to get the first active android emulator * Moves getAndroidEmulatorID to its own file and replaces its usage. It also adds specifying the device ID for Android local builds for cases when multiple devices/emulators are connected. * Remove unneeded filtering * Move setting the androidDeviceID value for Android cases only
* docs: Rewrite end-to-end testing documentation Update for breaking changes from upgrading Appium 2. Reduce verbosity and duplication to improve the approachability and maintainability of the documentation. * docs: Remove E2E test contributing documentation This was replaced by a section in the directory's README documentation. * docs: Rewrite end-to-end testing Getting Started section Update for breaking changes from upgrading Appium 2. Reduce verbosity and duplication between the `WordPress/gutenberg` repository to improve the approachability and maintainability of the documentation. * docs: Update links in Gutenberg for Mobile Apps code documentation Documents have been updated and consolidated to reduce verbosity and duplication to improve the approachability and maintainability of the documentation.
* Device tests - Removes skipped tests that haven't been enabled back for a while. These were disabled due to flakiness most likely to the interactions with the context menu to copy/paste text. If needed this can be restored once the flakiness issues are worked on. * Device Tests - Drag & Drop: removes disabled tests. These used utils that were flaky and have been disabled for a long time, they can be added back once stable utils are in place for pasting content. * Editor Page - Removes setHtmlContent since this util is not being used anymore. It can be added back if its needed. * Device Tests Utils - Removes usage of the wd library. It also removes, doubleTap, clickElementOutsideOfTextInput, and related utils to the context menu due to them being flaky and not currenlty in use: tapSelectAllAboveElement, tapCopyAboveElement and tapPasteAboveElement.
* test: Mitigate conflicts between development server caches Occasionally, cryptic npm package dependency errors can occur between test runs. They appear to originate from stale development caches, e.g. Metro server. Clearing these caches, which E2E tests should not rely upon mitigates the likelihood of these errors. * test: Prefix informative E2E test setup logs Merely an attempt to add structure to the outputted logs. * test: Avoid setup scripts during test runs There may be clarity and efficiency by having an explicit setup script. It was avoid running unnecessary scripts during test runs. It is also referenced in the current documentation as a script to run intentionally.
These assets are generated at build time for E2E testing. Seemingly, we do not leverage these generated files for the binary/bundle that we provide to the host apps. Therefore, we can safely ignore these files.
geriux
commented
Oct 24, 2023
geriux
commented
Oct 24, 2023
geriux
left a comment
Member
Author
There was a problem hiding this comment.
I can't approve my own PR but it looks good to me! 🚀
dcalhoun
approved these changes
Oct 24, 2023
dcalhoun
left a comment
Member
There was a problem hiding this comment.
Approved pending a post providing migration details to contributors.
Use of the "Gutenberg for Mobile Apps" name is still under review. In the meantime, we should use the existing "Mobile Gutenberg" project name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related
What?
This PR updates Appium to the newest
2.0.0version, it also replaces the usage ofwdin favor ofWebdriverIO.Why?
Newer versions of Xcode weren't compatible with Appium 1, so the code needs to be migrated to the latest version to stay up to date with the latest versions available and prevent disruptions in the future with a broken E2E testing environment.
How?
By completing the following tasks:
Setup
Tests
WD usage
wdusage and removes disabled tests #55541Testing Instructions
CI checks should pass in both Gutenberg and Gutenberg Mobile.
Testing Instructions for Keyboard
N/A
Screenshots or screencast
N/A