其他测试资源
本页包含用于详细了解如何编写 Android 测试的资源。
示例
Android 测试示例
Sunflower 演示版,它利用 Android 测试库。
IntentsBasicSample:intended()
和 intending()
的基本用法。
IdlingResourceSample:与后台作业同步。
基本的 Espresso 示例
CustomMatcherSample:展示如何扩展 Espresso 以与 EditText
对象的 hint 属性匹配。
DataAdapterSample:展示 Espresso 中适用于列表和 AdapterView
对象的 onData()
入口点。
IntentsAdvancedSample:模拟用户使用相机获取位图。
MultiWindowSample:展示如何将 Espresso 指向不同的窗口。
RecyclerViewSample:Espresso 的 RecyclerView
操作。
WebBasicSample:使用 Espresso-Web 与 WebView
对象互动。
BasicSampleBundled:Eclipse 和其他 IDE 的基本示例。
基本的 ActivityTestRule 示例:ActivityTestRule
的简单用法。
AndroidJunitRunnerSample:展示测试注释、参数化测试和测试套件的创建。
基本的 UIAutomator 示例
Codelab
Android 测试 Codelab
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2020-06-11 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]