在 Android 平台上测试应用   Android Jetpack 的一部分。

测试应用是应用开发过程中不可或缺的一部分。通过持续对应用运行测试,您可以在公开发布应用之前验证其正确性、功能行为和易用性。

测试还具有以下优势:

  • 快速获得故障反馈
  • 在开发周期中尽早进行故障检测
  • 更安全的代码重构,让您可以优化代码而不必担心回归。
  • 稳定的开发速度,帮助您最大限度地减轻技术负担。

文档

本文档介绍了有关测试 Android 应用的最佳实践:

其他资源

如需详细了解如何在 Android 平台上进行测试,请参阅以下资源。

示例

Codelab

媒体

This is part 2 of the Testing at scale series of articles where we asked industry experts to share their testing strategies. In this article, Ryan Harter, Staff Engineer at Dropbox, shares how the shape of Dropbox’s testing pyramid changed over time,

This is part of the Testing at scale series of articles where we asked industry experts to share their testing strategies. In this article, Ken Yee, Senior Engineer at Netflix, tells us about the challenges of testing a playback app at a massive

We’re excited to announce the new “Testing at scale” blog series! In these posts, industry experts working on different apps share their testing strategies, tips, and obstacles found along the way. This series complements the new Testing Strategies

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