-
Notifications
You must be signed in to change notification settings - Fork 1.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
Update androidxTestEspressoVersion to 3.5.0 #17615
Conversation
📲 You can test these changes on WordPress by downloading wordpress-installable-build-pr17615-83228e9.apk
|
📲 You can test these changes on Jetpack by downloading jetpack-installable-build-pr17615-83228e9.apk
|
👋 @pachlava ! I am shameless pinging you in this in case you can help with this single and consistent UI test failure on e2eLoginWithMagicLink. The logs that Firebase provides in this case aren't being too helpful, at least for me, maybe you can figure out what's wrong, since you've been working with failed UI tests for some time now. 🙏 🤞 🙇 I see this test got re-enabled a couple of months ago (see here), as such, I am not sure if it is just flaky or whatnot (see PR). I am also adding @jostnes here, in case you would like to collaborate on this, and mentioning this below, having copy-pasted it from that PR that enabled those tests. 🤔
Below, just an FYI for you on what I did so far.
PS: You will notice that I used
|
@ParaskP7 👋🌞 I'm still looking into it, but I'm very close to being sure that this is caused by too long duration of tests execution. In both runs associated with this PR (one, two) the execution time was over 15 min, which this warning tells about: So, it's possible that it has nothing to do with this exact test, it just happens to be the executed one when time reaches 15 min. Usually, the WPAndroid tests run for 11-12 minutes. I'll continue taking a look into why it became slower (update to |
👋 @pachlava ! Thank you so much for jumping into this problem so quickly, much appreciated! 🙇
Ah, this is very interesting! 🥇 It didn't even occur to me to do this I wonder how come it times-out exactly on this
Hmmm, you think? 🤔 Still, it is very unlikely that all other test succeed and this test is the one that fails, every single time. Maybe what we can do to verify this assumption is to:
Wdyt? 🤔
This is good to know, thanks for sharing! 💯 Having said that, I now feel that we are already at our limit here, right? We have a buffer of 3' mins, which might start causing us trouble going forward, if not already causing us hiccups. 🤔 Can't we update this 15' mins limit somehow? 🤔 If not, maybe we should try making our tests faster, or split them into two runs? 🤔
Again, thank you so much for helping us here Sergiy! 🙇 |
@ParaskP7 would it be possible to temporarily roll back to Regardless of the results from ^, I think the normal execution being still close to 15 minutes is a sign that we need to adjust it to 30? 🤔 (with potential of adding more tests / FLT just being slow). It looks like default value for --timeout parameter is 15 min, and to make it adjustable, this param has to be added to android_firebase_test.rb |
Of course @pachlava , feel free to create a branch from this PR and roll-it-back to PS: I am asking you to do that in order to avoid adding temporary commits to this branch and PR. I hope that's not too much of a trouble for you. 🙏
That's exactly what I was thinking too! 🤔
Sure, I would consider doing that too, but after we've exhausted all other options. Wdyt? 🤔 |
The order of tests execution on FTL tends to be the same from what I saw, and the
I'll do it @ParaskP7 and will get back with the results 👋 |
👍
👍
Hmmm... true, this makes sense, I think! 😅 🤔
👍 🙇 👋 |
I've created a testing branch and PR #17631 where I:
Now I see what you mean, sorry. I took a look into the first commit from this PR (4fb6f5a) which had 5 reruns of Instrumented Tests. In all 5 runs, the execution took a few seconds more than 15 minutes, and I think this all is a sign that:
Speaking of how to move on with this PR, I'm on the fence, if you ask for my opinion. On one hand, it's good to stay up-to-date, and maybe it makes sense to update to 3.5.0 once timeout support is available, since there are some new features in their release notes. On the other hand, we can see that the execution is at least 4 minutes slower for 3.5.0, which is a lot for multiple reruns per day for such an active repo. So maybe it's worth to wait for a bit, taking into account that 3.5.0 is relatively young 🤔 |
👋 @pachlava ! Thank you so much for looking into all that and of course for testing it out in order to figure out what's what, really appreciate the help here! 🙇
Yeap, it seems so indeed. 💯 I wonder why and whether there is something with our configuration that causes this trouble and performance degradation... 🤔 FYI: I know our UI e2e tests were build a while back, and that since then, we are only maintaining them, but without actively trying to improve them. Also, I know we have lots of Also, I wonder if us using
I totally agree on that, we should add this Having said the above, for now, I wouldn't change the
Yeap, I agree with you on that Sergiy, and I am actually not so much on the fence here, I think we should definitely delay the upgrade to Then, we could also wait on a newer possible Cc @oguzkocer , what are your thoughts on all that? 🤔 |
Generally, I agree with you, even though I saw a different idle() mostly used to wait for 100ms in the "last harmful" kind of finite waiting loop, and
I agree with you totally 👍
I know that some work had been done by @jostnes in this area recently, since a few months ago we were still using API28. I think that the main guidance for device selection was speed + tests stability, and the "Pixel2.arm + API30" combination was the fastest + most stable back then. Since this task does not require a lot of active involvement (and Internet 😅), I'll run a series of tests today in the dedicated PR #17636 I just opened, to see what else we can try.
👍 about that. It can be a good natural limiter, and also we will still have the option to adjust if really easily, if needed.
I agree here as well @ParaskP7 💯 |
👋 @pachlava !
Yeap, this is a different
True, we should exclude anything screenshot related from the metrics, good catch! 💯
This is awesome, thank you so much! 🙇 ❤️ 🤞 |
Some follow up on this, @ParaskP7 👋 Even though FTL lists a wide selection of devices for use ... .. and it looks like they are available right now with no additional purchase (or am I getting this wrong 🤔), this is the actual selection: Not that interesting any longer, with Pixel 3 probably being the fanciest.
This goes in line with what @jostnes described in /woocommerce/woocommerce-android/pull/7454:
After those checks, if we choose from what we currently have available, the |
I'll also actually try out the mysterious |
👋 @pachlava ! Thank you so much for going into all this trouble to figure out whether we could use another device/api alternative, you are awesome! ❤️
🤷 Yeaaa, it does seem so...
😅 Good luck! 🍀 🤞 |
Thanks, @ParaskP7, it was needed 😅 ! With MediumPhone, the behaviour is very similar to Pixel2:
This makes me think that API version plays the main role, while the model/device plays the secondary role (does it play any role at all, apart from a different screen size 🤔?), and there's no win in changing from what we currently use to other available options. |
👋 @pachlava !
Thank you a lot for sharing this data and for testing with
Yea, it indeed seems so, and once more, thanks for the thorough testing, which ends up helping with this first conclusion! 💯 I think we now have a better idea were to focus on more, which is the |
This is a temporal test configuration to see if connected tests will stop timing-out after 15' minutes of run. ------------------------------------------------------------------------ This is temporal test configuration is applied because running the below Gradle 'dependencies' command did show that the 'Espresso' dependency is now being transitively updated to '3.5.0' (from '3.4.0'), which is known to add significant delays to our UI tests, that is, as seen from testing such an update via its dedicated dependency update PR (see below): Gradle Command: ./gradlew :WordPress:dependencies --configuration jetpackWasabiDebugAndroidTestRuntimeClasspath Espresso PR: https://github.com/wordpress-mobile/WordPress-Android /pull/17615
Updates
androidxTestEspressoVersion
to3.5.0
.To test:
Since this dependency change is only related to testing, CI checks should be enough.
Regression Notes
Potential unintended areas of impact
N/A
What I did to test those areas of impact (or what existing automated tests I relied on)
N/A
What automated tests I added (or what prevented me from doing so)
N/A
PR submission checklist:
RELEASE-NOTES.txt
if necessary.