Does it possible using UI<https://proandroiddev.co...
# compose
m
Does it possible using UI Automator on Jetpack Compose UI?
👌 1
a
Yes, it'll work, but full end to end tests with UIAutomator are often easy to introduce flakes in. As one example, we have one in the Compose UI test suite that started failing early on in Android 12's development because it simulated a drag from the upper left to the lower right of an almost full-screen ComposeView, and Android 12 altered the touch detection for swiping down the notification shade
🙏 1
They're critical for writing certain kinds of integration tests but if you can get away with just the compose input testing stuff, you'll avoid things like the above
m
but if you can get away with just the compose input testing stuff, you’ll avoid things like the above
ahh, nice insight
but full end to end tests with UIAutomator are often easy to introduce flakes in.
Absolutely agreed! This is where we want to convince our stakeholder (QA Lead, Tech Lead) why the automation should be moved to input testing as suggested (to reduce the flaky test)
m
+1 to being flake. We use it as well in accompanist to test the permissions library and manually interact with the permission dialog in tests… and it’s a pain! Different Android APIs show different system UI that needs to be handled in the test…, etc etc. e.g. https://github.com/google/accompanist/blob/main/permissions/src/androidTest/java/com/google/accompanist/permissions/RequestPermissionTest.kt
🤯 1
K 1
🔥 1
c
cc @ppvi
p
what do you need UI Automator for @miqbaldc?
m
currently still gathering ideas which UI Test tool to use for my company, any alternative preferences?
1
p
yes, use Compose's UI Test framework
🙏 1
d
I personally found UIAutomator useful to test the app as a black box; from a real user point of view without knowing any of the app internals (can also be a separate testing app not linked to the app); but maybe it is possible to do the same with other UI test framework ?