android / android/android-test
Flaky Espresso.intended() won't find anything sometimes
- Lingua principale
- Java
- Stelle
- 1.2k
- Fork
- 342
- Merge medio
- 11h 29m
- PR unite (30g)
- 2
Descrizione
### Description
Flaky Espresso.intended() won't find anything sometimes.
### Steps to Reproduce
Run the test proveEspressoIntendedIssue0 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.1.1'
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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia eseguendo proveEspressoIntendedIssue0 in app/src/androidTest/java/com/issues/espressoidling/MainActivity2Test.kt dal repository di riproduzione collegato, utilizzando le versioni elencate di AndroidX Test e Android R Preview 4. Indaga sul motivo per cui Espresso.intended() si blocca intermittentemente o non trova alcuna view; il lavoro è completato quando il test trova in modo affidabile la view prevista in esecuzioni ripetute.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- android, kotlin
- Ambito
- mobile-dev, testing
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100