mcpField
A
android-testing

android-testing

github.com/fandhe-aiテスト・品質440 回インストール2 日前に更新
リポジトリ

android-testing について

Kotlin 製 Android アプリのテストに関するリファレンススキルです。タスク別の案内から、ローカル、インストルメンテーション、UI、性能、CI、画面サイズ別の資料を探せます。テストを実行するものではありません。

主な機能

  1. 01タスク別のカテゴリ案内
  2. 02JUnit とテストダブルのガイド
  3. 03インストルメンテーションと Espresso
  4. 04Compose UI テストのガイド
  5. 05性能テストと CI の資料
  6. 06画面サイズ別テストの資料

活用シーン

  1. 01ローカルか計装テストかの選択
  2. 02Espresso または Compose UI テストの作成
  3. 03Android アプリの性能測定
  4. 04CI のテスト実行計画

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/fandhe-ai/agent-reference-skills --skill android-testing

インストール後、Claude Code で/android-testingを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

references/compose-testing/
accessibility-testing.md
actions.md
assertions.md
common-patterns.md
compose-test-rule.md
compose-testing-v2.md
debug.md
device-configuration-override.md
espresso-interop.md
finders.md
preview-screenshot-testing.md
print-to-log.md
README.md
screenshot-testing.md
semantics-matcher.md
semantics-node-interaction.md
state-restoration-tester.md
synchronization.md
test-tag-usage.md
testing-cheatsheet.md
references/continuous-integration/
ci-automation.md
ci-basics.md
ci-features.md
README.md
references/different-screens/
libraries-and-tools.md
overview.md
README.md
window-testing.md
references/espresso/
accessibility-checks.md
basics.md

詳細

プロジェクトの README より

Android Testing リファレンス

Android アプリ (Kotlin) のテストに関する公式ドキュメントを蒸留したスキル。 ユーザーのタスクに応じて適切な README.md を読み、そこから個別ファイルへ辿ること。

ディレクトリ構成

skills/android-testing/
  SKILL.md
  references/
    fundamentals-local/
      README.md
      test-pyramid.md
      what-to-test.md
      test-dependencies.md
      junit4-basics.md
      test-doubles.md
      mockito.md
      mockk.md
      truth.md
      robolectric.md
      coroutines-testing.md
      flow-testing.md
      viewmodel-testing.md
      instanttaskexecutorrule.md
      testable-design.md
    instrumented/
      README.md
      ui-tests.md
      androidjunit4-test-runner.md
      set-up-project.md
      instrumentationregistry.md
      applicationprovider.md
      activityscenario.md
      activityscenariorule.md
      fragmentscenario.md
      servicetestrule.md
      uiautomator.md
      test-filter-annotations.md
      grantpermissionrule.md
      androidtestorchestrator.md
      screenshot-testing.md
      gradle-managed-devices.md
      test-stability.md
      content-provider-testing.md
    espresso/
      README.md
      overview.md
      basics.md
      setup.md
      cheat-sheet.md
      onview.md
      viewinteraction.md
      viewmatchers.md
      viewactions.md
      viewassertions.md
      ondata.md
      recyclerviewactions.md
      global-actions.md
      idling-resource.md
      intents.md
      web.md
      accessibility-checks.md
      custom-matchers-actions.md
      best-practices.md
      recipes.md
      espresso-device.md
      contrib-actions.md
      multiprocess.md
    compose-testing/
      README.md
      testing-cheatsheet.md
      compose-test-rule.md
      finders.md
      semantics-matcher.md
      assertions.md
      actions.md
      semantics-node-interaction.md
      print-to-log.md
      synchronization.md
      test-tag-usage.md
      espresso-interop.md
      screenshot-testing.md
      preview-screenshot-testing.md
      accessibility-testing.md
      state-restoration-tester.md
      device-configuration-override.md
      compose-testing-v2.md
      common-patterns.md
      debug.md
    performance-testing/
      README.md
      compilation-mode.md
      macrobenchmark-metrics.md
      macrobenchmark-rule.md
      microbenchmark-rule.md
    continuous-integration/
      README.md
      ci-basics.md
      ci-automation.md
      ci-features.md
    different-screens/
      README.md
      overview.md
      libraries-and-tools.md
      window-testing.md

探索手順

タスクからカテゴリを引き、カテゴリの README.md で目的のページを特定する:

  1. 下記マッピング表でタスクに対応するカテゴリを探す
  2. そのカテゴリの references/{category}/README.md を参照して目的のページを特定する
  3. 該当ページの .md を Read して詳細を確認する

タスク → カテゴリ マッピング

タスクカテゴリ参照 README
テストピラミッド・テスト戦略・test/ と androidTest/ の使い分けを知りたいfundamentals-localreferences/fundamentals-local/README.md
JUnit4 の @Test / @Before / テストダブル・Mockito・MockK でユニットテストを書きたいfundamentals-localreferences/fundamentals-local/README.md
Truth でアサーションを書きたい、Robolectric で JVM 上に Android テストを実行したいfundamentals-localreferences/fundamentals-local/README.md
coroutines / Flow / ViewModel のテストを書きたい(runTest, TestDispatcher)fundamentals-localreferences/fundamentals-local/README.md
AndroidJUnit4 / InstrumentationRegistry / ApplicationProvider で計装テストを構築したいinstrumentedreferences/instrumented/README.md
ActivityScenario / FragmentScenario でライフサイクルを制御したいinstrumentedreferences/instrumented/README.md
UiAutomator でアプリ横断 UI 操作をしたい、GrantPermissionRule で権限を付与したいinstrumentedreferences/instrumented/README.md
AndroidTestOrchestrator / Gradle Managed Devices でテスト実行を分離・スケールしたいinstrumentedreferences/instrumented/README.md
Espresso.onView / ViewMatchers / ViewActions / ViewAssertions で View 系 UI をテストしたいespressoreferences/espresso/README.md
RecyclerViewActions / IdlingResource で非同期・リスト UI をテストしたいespressoreferences/espresso/README.md
Espresso-Intents / Espresso-Web で Intent や WebView をテストしたいespressoreferences/espresso/README.md
createComposeRule / finder / SemanticsMatcher で Compose UI をテストしたいcompose-testingreferences/compose-testing/README.md
Compose のアサーション・アクション・テスト同期(waitForIdle 等)を制御したいcompose-testingreferences/compose-testing/README.md
Compose と Espresso/UiAutomator を相互運用したい、スクリーンショットテストを書きたいcompose-testingreferences/compose-testing/README.md
Compose テストの典型パターン(composable の分離・状態到達方法)を知りたい、semantics tree をデバッグしたいcompose-testingreferences/compose-testing/README.md
MacrobenchmarkRule で起動・スクロール・アニメーションの性能を計測したいperformance-testingreferences/performance-testing/README.md
BenchmarkRule でホットパスをマイクロベンチマークしたいperformance-testingreferences/performance-testing/README.md
CompilationMode / Metric で計測条件と取得指標を制御したいperformance-testingreferences/performance-testing/README.md
何をテストすべきか(必須ユニットテスト・境界値・避けるべきテスト)を知りたいfundamentals-localreferences/fundamentals-local/README.md
UI テストの自動化方針(behavior / screenshot の区別、Jetpack の UI テストフレームワークの選び方)を知りたいinstrumentedreferences/instrumented/README.md
Espresso の導入(依存関係・instrumentation runner 設定)、基本 API の構成、チートシートを知りたいespressoreferences/espresso/README.md
Compose テスト API のチートシート(finder / matcher / assertion / action 一覧)を引きたいcompose-testingreferences/compose-testing/README.md
CI パイプラインを設計したい(基本ジョブ・計装テスト・性能回帰・カバレッジ回帰、環境・キャッシュ・シャーディング・リトライ)continuous-integrationreferences/continuous-integration/README.md
画面サイズ・ウィンドウサイズ別にテストしたい(DeviceConfigurationOverride、Robolectric qualifiers、Gradle managed devices、Espresso Device、WindowLayoutInfoPublisherRule / TestWindowLayoutInfo)different-screensreferences/different-screens/README.md
Hilt のテストをしたい-android-architecture スキルの担当
Room のテストをしたい-android-data スキルの担当
WorkManager のテストをしたい-android-background-work スキルの担当

コメント