Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Kiểm thử ứng dụng trên Android
Một phần của Android Jetpack.
Kiểm thử ứng dụng là một phần không thể thiếu trong quá trình phát triển ứng dụng. Bằng cách chạy các quy trình kiểm thử cho ứng dụng một cách nhất quán, bạn có thể xác minh độ chính xác, hành vi của chức năng và khả năng hữu dụng của ứng dụng trước khi phát hành chính thức.
Việc kiểm thử cũng mang lại những lợi ích sau:
- Phản hồi nhanh về các lỗi.
- Phát hiện lỗi sớm trong chu kỳ phát triển.
- Tái cấu trúc mã an toàn hơn, cho phép bạn tối ưu hoá mã mà không lo lắng về việc hồi quy.
- Tốc độ phát triển ổn định, giúp bạn giảm thiểu nợ kỹ thuật.
Tài liệu
Tài liệu này trình bày các phương pháp hay nhất để kiểm thử ứng dụng Android:
Tài nguyên khác
Để biết thêm thông tin về quy trình kiểm thử trên Android, hãy tham khảo các tài nguyên sau.
Mẫu
Lớp học lập trình
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-07-27 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-27 UTC."],[],[],null,["# Test apps on Android\nPart of [Android Jetpack](/jetpack).\n=========================================================\n\nTesting your app is an integral part of the app development process. By running\ntests against your app consistently, you can verify your app's correctness,\nfunctional behavior, and usability before you release it publicly.\n\nTesting also offers the following advantages:\n\n- **Rapid feedback** on failures.\n- **Early failure detection** in the development cycle.\n- **Safer code refactoring**, allowing you to optimize code without worrying about regressions.\n- **Stable development velocity**, helping you minimize technical debt.\n\nDocumentation\n-------------\n\nThe documentation covers best practices around testing Android apps:\n\n- [Fundamentals of testing Android apps](/training/testing/fundamentals)\n- [Build local unit tests](/training/testing/local-tests) that run on the host\n- [Build instrumented tests](/training/testing/instrumented-tests) that run on devices or emulators\n- Verify UIs with [Behavior](/training/testing/ui-tests/behavior) and [Screenshot tests](/training/testing/ui-tests/screenshot)\n- [Test different screen sizes](/training/testing/different-screens)\n\nAdditional resources\n--------------------\n\nFor more information about testing on Android, consult the following resources.\n\n### Samples\n\n- [Android testing samples](https://github.com/android/testing-samples)\n- [Now In Android demo app](https://github.com/android/nowinandroid), which makes use of the Android testing libraries.\n\n### Codelabs\n\n- [Android Testing Codelab](/codelabs/advanced-android-kotlin-training-testing-basics)\n\nMedia\n-----"]]