Closed github-actions[bot] closed 1 year ago
以前に書いた以下の記事を参考にして対応していく
https://zenn.dev/kotaro666/articles/android-unit-test-sample
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
Dagger Hilt ライブラリで依存性注入したアーキテクチャの場合、Fragment の UI テストに withId
でのレイアウトやウィジェットの探索が終わらない状態となっていた。
そのため、代替案として findViewById
でテストしたいレイアウトやウィジェットの探索を行い、テストケースを作成しました。
対応内容が develop にマージされましたので、本 Issue をクローズします。
現在のプログラムではテストがありません。UnitTest や UITest を追加してください。