Request for test coverage
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
ファイルもテストのエントリポイントも指定されていません。まず、codelab の PagingDataAdapter の使用方法と addLoadStateListener に関する説明を確認し、その後、API の負のレスポンスで showError() がどのように検証されるべきかを判断してください。このシナリオのカバレッジを追加し、同様のケースに推奨されるテスト方法を明確にすれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hello,
Thanks for your work! Could you please add test coverage for common test scenarios?
I am moving from old paradigm (rxjava, model-view-presenter, etc) to a new one (data binding, view model, coroutines, etc) and looking for a right way to cover it with tests. In particular case I have screen with PagingDataAdapter and need to verify is there a call of showError() when API is set to return negative response from server.
In the past I would provide a view interface which will handle all operation on view layer within activity|fragment and mock it in the tests and call verify(view).invoke(showError()). Nowadays it looks like it is not a preferred way, PagingDataAdapter has addLoadStateListener() where, in theory, we also could provide mocks. I am working on this right now, but would like to see how Google team sees the right way to write tests for this and similar common cases.
p.s.
I have read this your legal notice , as I haven't provided any code yet I leave this paperwork for later.
- 主要言語
- Kotlin
- スター
- 508
- フォーク
- 268
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
android/codelab-android-paging のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
android/codelab-android-paging#236 · リアクション 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
android/codelab-android-paging#243 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜2日 初心者へのやさしさ 35/100
android/codelab-android-paging#241 · コメント 1 件 ·
android/codelab-android-paging の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
getdictus/dictus-android#187 ·
メンテナーはふだん 1 日以内に返信
-
documentation follow-up
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
follow-up
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
yschimke/meshcore-mobile#586 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Kotlin/kotlinx-io#529 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
mcnaveen/health-connect-webhook#110 ·
メンテナーはふだん 1 日以内に返信