关于 android-testing
面向 Kotlin Android 应用测试的参考 Skill,按任务分类,帮助开发者查找本地、计装、界面、性能、CI 和不同屏幕测试资料。它通过索引引导至具体 Markdown 文档,不负责运行测试。
主要功能
- 01按任务映射参考类别
- 02JUnit 与测试替身指南
- 03计装测试和 Espresso 测试
- 04Compose 界面测试指南
- 05性能与 CI 测试参考
- 06不同屏幕尺寸测试指南
适用场景
- 01选择本地或计装测试方案
- 02编写 Espresso 或 Compose 界面测试
- 03测量 Android 应用性能
- 04规划 CI 中的测试执行
安装
复制下面的命令,在终端中运行。
$
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.mdactions.mdassertions.mdcommon-patterns.mdcompose-test-rule.mdcompose-testing-v2.mddebug.mddevice-configuration-override.mdespresso-interop.mdfinders.mdpreview-screenshot-testing.mdprint-to-log.mdREADME.mdscreenshot-testing.mdsemantics-matcher.mdsemantics-node-interaction.mdstate-restoration-tester.mdsynchronization.mdtest-tag-usage.mdtesting-cheatsheet.mdreferences/continuous-integration/ci-automation.mdci-basics.mdci-features.mdREADME.mdreferences/different-screens/libraries-and-tools.mdoverview.mdREADME.mdwindow-testing.mdreferences/espresso/accessibility-checks.mdbasics.md详细介绍
来自项目 READMEAndroid 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 で目的のページを特定する:
- 下記マッピング表でタスクに対応するカテゴリを探す
- そのカテゴリの
references/{category}/README.mdを参照して目的のページを特定する - 該当ページの
.mdを Read して詳細を確認する
タスク → カテゴリ マッピング
| タスク | カテゴリ | 参照 README |
|---|---|---|
テストピラミッド・テスト戦略・test/ と androidTest/ の使い分けを知りたい | fundamentals-local | references/fundamentals-local/README.md |
JUnit4 の @Test / @Before / テストダブル・Mockito・MockK でユニットテストを書きたい | fundamentals-local | references/fundamentals-local/README.md |
| Truth でアサーションを書きたい、Robolectric で JVM 上に Android テストを実行したい | fundamentals-local | references/fundamentals-local/README.md |
coroutines / Flow / ViewModel のテストを書きたい(runTest, TestDispatcher) | fundamentals-local | references/fundamentals-local/README.md |
AndroidJUnit4 / InstrumentationRegistry / ApplicationProvider で計装テストを構築したい | instrumented | references/instrumented/README.md |
ActivityScenario / FragmentScenario でライフサイクルを制御したい | instrumented | references/instrumented/README.md |
UiAutomator でアプリ横断 UI 操作をしたい、GrantPermissionRule で権限を付与したい | instrumented | references/instrumented/README.md |
AndroidTestOrchestrator / Gradle Managed Devices でテスト実行を分離・スケールしたい | instrumented | references/instrumented/README.md |
Espresso.onView / ViewMatchers / ViewActions / ViewAssertions で View 系 UI をテストしたい | espresso | references/espresso/README.md |
RecyclerViewActions / IdlingResource で非同期・リスト UI をテストしたい | espresso | references/espresso/README.md |
| Espresso-Intents / Espresso-Web で Intent や WebView をテストしたい | espresso | references/espresso/README.md |
createComposeRule / finder / SemanticsMatcher で Compose UI をテストしたい | compose-testing | references/compose-testing/README.md |
Compose のアサーション・アクション・テスト同期(waitForIdle 等)を制御したい | compose-testing | references/compose-testing/README.md |
| Compose と Espresso/UiAutomator を相互運用したい、スクリーンショットテストを書きたい | compose-testing | references/compose-testing/README.md |
| Compose テストの典型パターン(composable の分離・状態到達方法)を知りたい、semantics tree をデバッグしたい | compose-testing | references/compose-testing/README.md |
MacrobenchmarkRule で起動・スクロール・アニメーションの性能を計測したい | performance-testing | references/performance-testing/README.md |
BenchmarkRule でホットパスをマイクロベンチマークしたい | performance-testing | references/performance-testing/README.md |
CompilationMode / Metric で計測条件と取得指標を制御したい | performance-testing | references/performance-testing/README.md |
| 何をテストすべきか(必須ユニットテスト・境界値・避けるべきテスト)を知りたい | fundamentals-local | references/fundamentals-local/README.md |
| UI テストの自動化方針(behavior / screenshot の区別、Jetpack の UI テストフレームワークの選び方)を知りたい | instrumented | references/instrumented/README.md |
| Espresso の導入(依存関係・instrumentation runner 設定)、基本 API の構成、チートシートを知りたい | espresso | references/espresso/README.md |
| Compose テスト API のチートシート(finder / matcher / assertion / action 一覧)を引きたい | compose-testing | references/compose-testing/README.md |
| CI パイプラインを設計したい(基本ジョブ・計装テスト・性能回帰・カバレッジ回帰、環境・キャッシュ・シャーディング・リトライ) | continuous-integration | references/continuous-integration/README.md |
画面サイズ・ウィンドウサイズ別にテストしたい(DeviceConfigurationOverride、Robolectric qualifiers、Gradle managed devices、Espresso Device、WindowLayoutInfoPublisherRule / TestWindowLayoutInfo) | different-screens | references/different-screens/README.md |
| Hilt のテストをしたい | - | android-architecture スキルの担当 |
| Room のテストをしたい | - | android-data スキルの担当 |
| WorkManager のテストをしたい | - | android-background-work スキルの担当 |
评论
支持 Markdown