Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Request for test coverage

オープン
#203 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
android, kotlin
領域
mobile, testing

調査の方向性

ファイルもテストのエントリポイントも指定されていません。まず、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 はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

android/codelab-android-paging のほかの issue

android/codelab-android-paging の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

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

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