-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[RNMobile] Fixes for e2e tests (Gutenberg demo build cache + error logging in setup) #29589
Conversation
Size Change: +1.17 kB (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
@@ -62,7 +62,7 @@ jobs: | |||
run: sudo xcode-select --switch /Applications/Xcode_12.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we maybe also try to switch to the latest Xcode/simulator if appium
allows it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good point, we could try to update it and see if it also works. If you don't mind, I'd like to do it in a separate PR because this PR is blocking another one that blocks a second one 😄 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to test if it works with Xcode version 12.2
(commented here).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It worked with Xcode version 12.2
(comment).
@ceyhun I'm going to merge this PR to unblock the other referenced PRs but we could test with the latest Xcode version 12.4
supported by MacOS machines in a new branch/PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good and the tests passed, but running npm run native test:e2e:build-app:ios
followed by TEST_RN_PLATFORM=ios npm run native device-tests:local gutenberg-editor-gallery
locally gives an error:
E2E setup exception: Error: [init({"browserName":"","platformName":"iOS","os":"iOS","deviceOrientation":"portrait","automationName":"XCUITest","appiumVersion":"1.17.1","app":"/Users/paulvonschrottky/projects/gutenberg/packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app","processArguments":{"args":["uitesting"]},"deviceName":"iPhone 11"})] The environment you requested was unavailable.
An unknown server-side error occurred while processing the command. Original error: Unable to start WebDriverAgent session because of xcodebuild failure: The application under test with bundle id 'org.wordpress.gutenberg.development' is not running, possibly crashed
at /Users/paulvonschrottky/projects/gutenberg/node_modules/wd/lib/webdriver.js:154:15
at Request._callback (/Users/paulvonschrottky/projects/gutenberg/node_modules/wd/lib/http-utils.js:89:7)
at Request.self.callback (/Users/paulvonschrottky/projects/gutenberg/node_modules/request/request.js:185:22)
at Request.emit (events.js:315:20)
at Request.<anonymous> (/Users/paulvonschrottky/projects/gutenberg/node_modules/request/request.js:1161:10)
at Request.emit (events.js:315:20)
at IncomingMessage.<anonymous> (/Users/paulvonschrottky/projects/gutenberg/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1327:12) {
data: `{"status":13,"value":{"message":"An unknown server-side error occurred while processing the command. Original error: Unable to start WebDriverAgent session because of xcodebuild failure: The application under test with bundle id 'org.wordpress.gutenberg.development' is not running, possibly crashed"},"sessionId":null}`
}
I checked the |
I'm trying locally and I'm not getting that error, however I realised that I had to run Could you run the following commands to verify if it was caused by the RN bundle?
I also spotted that if I don't have the simulator already booted, every time I build the app and then run the e2e tests the simulator gives the following error: |
I added a capability that as far as I checked it fixes the problem for booting up the iOS simulator (commit). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I re-tried with the added step to bundle and it worked! 🎉
I'm not clear on the effect of waitForQuiescence
since I see the iOS build failing still, but since this PR looks to fix the broken cache (huge win) plus adds logging, I think it's ready to merge. I'm not sure if you want to leave the waitForQuiescence
setting in or remove it.
This reverts commit 0108c27.
Nice!
I've just reverted the change because although locally it was working, I noticed that it didn't fix the e2e tests on the CI 😞 . |
I've changed the Xcode version to |
I've made a small change in the @guarani since I made some changes, I'd appreciate if you could review it again 🙏 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @fluiddot! Yep, looks like updating Xcode did the trick to fix the failing builds! 🤞
Description
I added a couple of fixes for the native e2e tests:
How has this been tested?
Gutenberg demo app's path
rm -rf packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app
.test -e packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app/GutenbergDemo || echo "Trigger build"
.Trigger build
because the app is not present.npm run native test:e2e:bundle:ios && npm run native test:e2e:build-app:ios
to build the app.test -e packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app/GutenbergDemo || echo "Trigger build"
.Error handler
caps
file, something like:TEST_RN_PLATFORM=ios npm run native device-tests:local gutenberg-editor-gallery
.caps
file.TEST_RN_PLATFORM=ios npm run native device-tests:local gutenberg-editor-gallery
.Screenshots
Types of changes
Checklist: