ankidroid / ankidroid/Anki-Android
Attempt to configure androidTest to not keep activities and background/resume activities under test
- Dominant language
- Kotlin
- Stars
- 11.8k
- Forks
- 2.9k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 171
Description
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 https://github.com/ankidroid/Anki-Android/issues/17407#issuecomment-2466726036_
Contributor guide
Assessment
This issue has not been assessed yet.