Android でアプリをテストする   Android Jetpack の一部

アプリのテストは、アプリの開発に欠かすことのできないプロセスです。アプリに対して一貫性のあるテストを実施することで、アプリの公開前に、その正確性、機能の動作、使いやすさを検証できます。

テストには、次のような利点もあります。

  • エラーに関する迅速なフィードバック
  • 開発サイクルにおける早期のエラー検出
  • 安全なコードのリファクタリング。リグレッションを気にせずにコードを最適化できます。
  • 開発速度の安定。技術的負債を最小限に抑えるのに役立ちます。

ドキュメント

このドキュメントでは、Android アプリのテストに関するベスト プラクティスについて説明します。

参考情報

Android でのテストの詳細については、次のリソースをご覧ください。

サンプル

Codelab

メディア

You can test a ViewModel by simply creating an instance using its constructor in your test code. However, this approach has limitations — there is no straightforward way to: With ViewModelScenario, these are now easy to test, helping you catch errors

Keep your UI delightful by testing it! Previews allow quickly verifying components during development, which can be automated with the preview screenshot testing Gradle plugin to create visual regression tests. Behavior tests can use

We work closely with many teams and one thing they all have in common is a justified growing focus on automated testing. More features, more form factors, and more supported Android releases make tests increasingly important. These guides don’t focus

Compared to phone apps, developing high quality health and fitness experience for Wear — and especially performing manual QA — can be a bit tricky. Capabilities vary between devices, and running (or swimming!) over and over to test a user journey is