m

    miqbaldc

    1 year ago
    Does it possible using UI Automator on Jetpack Compose UI?
    Adam Powell

    Adam Powell

    1 year ago
    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
    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

    miqbaldc

    1 year ago
    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)
    Manuel Vivo

    Manuel Vivo

    1 year ago
    +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
    cb

    cb

    1 year ago
    cc @ppvi
    ppvi

    ppvi

    1 year ago
    what do you need UI Automator for @miqbaldc?
    m

    miqbaldc

    1 year ago
    currently still gathering ideas which UI Test tool to use for my company, any alternative preferences?
    ppvi

    ppvi

    1 year ago
    yes, use Compose's UI Test framework
    d

    dany

    1 year ago
    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 ?