android / android/android-test

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

オープン
#657 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
1.2k
フォーク
342
平均マージ
11時間 29分
マージ済み PR(30日)
2

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

app/src/androidTest/java/com/issues/espressoidling/MainActivity2Test.kt から始め、指定された AndroidX Test と Espresso のバージョンを使用して proveEspressoIntendedIssue0 のみを実行します。Android R Preview 4 で断続的にハングする問題を再現し、その後、なぜ Espresso.intended() がビューを見つけられないことがあるのかを特定します。テストが意図したビューを確実に見つけられれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, kotlin
領域
mobile, testing
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。