android / android/android-test

Flaky Espresso.intended() won't find anything sometimes

Abierto
#657 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
1.2k
Forks
342
Merge medio
11 h 29 min
PR fusionados (30 d)
2

Descripción

Description
Flaky Espresso.intended() won't find anything sometimes.

Steps to Reproduce
Run the test **proveEspressoIntendedIssue0** (ignore other tests in there!) here: https://github.com/mobilekosmos/EspressoDialogsIssue/blob/master/app/src/androidTest/java/com/issues/espressoidling/MainActivity2Test.kt

The issue doesn't only happen because of using the loop, this is also happening when running the test manually, but difficult to reproduce when doing so, it works a few times, then it doesn't, therefore the loop where it was always reproducible till now on a Pixel 3a.

Expected Results
Espresso.intended() shuould always find a view.

Actual Results
Sometimes Espresso.intended() will hang and not find anything.

AndroidX Test and Android OS Versions
Android R Preview 4
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.test.espresso:espresso-idling-resource:3.2.0'
androidTestImplementation("androidx.test.espresso:espresso-intents:3.2.0")

Link to a public git repo demonstrating the problem:
https://github.com/mobilekosmos/EspressoDialogsIssue/blob/master/app/src/androidTest/java/com/issues/espressoidling/MainActivity2Test.kt

p.s.: could you please stop closing issues so fast without really taking a good look into it? It's the third time I must open this issue because you didn't look at the pointed location.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con app/src/androidTest/java/com/issues/espressoidling/MainActivity2Test.kt y ejecuta únicamente proveEspressoIntendedIssue0 usando las versiones de AndroidX Test y Espresso indicadas. Reproduce el bloqueo intermitente en Android R Preview 4 y determina después por qué Espresso.intended() a veces no encuentra la vista. La tarea estará terminada cuando la prueba encuentre de forma fiable la vista esperada.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
android, kotlin
Área
mobile, testing
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.