ankidroid / ankidroid/Anki-Android

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

Abierto
#17,410 9 comentarios 0 reacciones 0 asignados Ver en GitHub
Dev Keep Open Tests
Lenguaje dominante
Kotlin
Estrellas
11.8k
Forks
2.9k
Merge medio
2 d 3 h
PR fusionados (30 d)
171

Descripción

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_

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.