Skip to content

Attempt to configure androidTest to not keep activities and background/resume activities under test #17410

@mikehardy

Description

@mikehardy

Can we configure androidTest to not keep activities and background/resume?

Note, this may not be possible / technically feasible. A quick exploratory attempt to configure an emulator programmatically (via adb?) to not keep activities is a first step. Then a load of one activity and background / resume cycle of that activity is a second step to see if it is even possible.

Would be an interesting way to surface these sorts of errors that happen semi-frequently where assumptions are made about activity (and now fragment) lifecycle in the face of need to re-construct activity

We have an "all activity load" type test that was meant to check for layout inflation issues, maybe that could be extended to not just load+inflate but also background the app while don't-keep-activities was set then foreground it again

Originally posted by @mikehardy in #17407 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    DevDevelopment, testing & CITests

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions