原文:android開發(fā)者培訓文檔之Testing
- Android提供了一個集成的測試框架,可以幫助你測試您的應(yīng)用程序的各個方面
- The AndroidSDK and Testing Support Library提供了一些工具和API能讓你在模擬器和真機中運行測試程序
- 可以在Android Studio或者命令行中構(gòu)建和執(zhí)行測試程序
閱讀以下資源,你可以熟悉Android應(yīng)用測試
測試的相關(guān)概念:熟悉APP測試的相關(guān)概念和學習一些Google提供的工具和庫
-
測試概念
- 首先,得掌握 JUnit的基礎(chǔ)知識:
- JUnit是一個簡單的框架來寫重復的測試。這是單元測試框架的xUnit架構(gòu)的一個實例。
- JUnit的一個demo
- Android testing is based on JUnit. In general, a JUnit test is a method whose statements test a part of the application. You organize test methods into classes called test cases. You can further organize these classes into test suites.
- 首先,得掌握 JUnit的基礎(chǔ)知識:
In JUnit, you build one or more test classes and use a test runner to execute them. In Android, you use Android Studio (or the Android Plugin for Gradle) to build one or more test source files into an Android test app.
開始測試