简介
Espresso 是在2013年的 GTAC 上首次提出,目的是让开发人员能够快速地写出简洁,美观,可靠的 Android UI 测试。
在你的项目中添加 Espresso
其实说再多还是先动手实操才是最实际的。
- 首先保证你的 Android Support Repository 已经成功安装
在你程序的 build.gradle 文件中添加依赖
// Force usage of support annotations in the test app, since it is internally used by the runner module. androidTestCompile 'com.android.support:support-annotations:23.1.1' androidTestCompile 'com.android.support.test:runner:0.4.1' androidTestCompile 'com.android.support.test:rules:0.4.1' androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1