-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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] Add iOS platform version to iOS local e2e capabilities #29715
Conversation
Size Change: 0 B Total Size: 1.4 MB ℹ️ View Unchanged
|
When running the iOS e2e tests locally, we no longer require to specify the platform version because we can fetch the available iOS simulator runtimes and pick the latest one.
fc078ed
to
d55a5bc
Compare
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.
This is looking great, thanks @fluiddot! But unfortunately the iOS e2e still seems to fail :( I just restarted it.
Yeah, I'm still investigating it. It's weird because I ran a lot of tests and it was working but when I reverted all the changes I did for testing, it began to fail again 😭 . |
I think I've finally found out the root cause of the flakiness 🎊 . After enabling the Xcode logs with the Here is an Appium log as an example of the error: Example
This explains why in some cases they pass, if the process finishes before the 60 seconds the test passes if not it fails 😄 . SolutionA quick solution I've done is basically increase the timeout (I set it to 4 minutes) to guarantee that the building process has enough time to finish. The best solution IMHO would be to manually build the WDA and cache it to save CI time, since this directly affects the development process, let's continue with this solution and tackle the optimal one in the future. I checked the Appium logs with this solution and as I expected the build takes more than expected (2m 45s):
|
Great news @fluiddot, I'll re-rerun them one more time to enjoy a bit more 🎉👏🎉👏🎉 Do you think it makes sense to remove
I saw a |
Sure! I wasn't sure about removing it in case we would need to check if something fails in the future, but it makes totally sense to remove it to reduce all the noise 👍 .
That's an awesome solution 🎉 ! I was also considering the option to set a specific derived data path ( |
@fluiddot IIRC we shouldn't have any derived data related to Gutenberg demo build in there, it's specifically set to use |
Oh good point, in that case it should be safe to use that folder because it will only contain the derived data for the WDA. Another thing to consider is that once we use the |
I'm rethinking this part and probably we could only need add the By the way I created a draft PR with a first approach for this idea, feel free to check it and modify it. |
Description
This PR adds the
platformVersion
capability explicitly to the desired capabilities list when running the e2e tests locally. Although this capability is not mandatory when using an iOS simulator, we're going to add it in case it helps to reduce the flakiness when running the e2e tests, as we have experienced recently.For this purpose, I added an extra step when setting up the driver for running the tests. Now it fetches the latest iOS platform version and uses it as the
platformVersion
capability.Additionally when running the tests, it also prints the available iOS platform versions, here as an example:
How has this been tested?
For testing if the setup picks the latest iOS platform, it's recommended to install additional iOS simulator versions. This can be done from the Xcode app in
Xcode/Preferences/Components/Simulators
.npm run native test:e2e:ios:local
.Screenshots
N/A
Types of changes
Bug fix
Checklist: