ankidroid / ankidroid/Anki-Android

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

Ouverte
#17,410 9 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Dev Keep Open Tests
Langage dominant
Kotlin
Étoiles
11.8k
Forks
2.9k
Merge moyen
2 j 3 h
PR mergées (30 j)
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_

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.