美文网首页
Android ,测试支持库

Android ,测试支持库

作者: alphet | 来源:发表于2019-02-25 15:41 被阅读1次

本文学习使用,
Espresso、Ui Automator、AndroidJUnitRunner
进行测试的具体细节
一 、在app gradle文件里面配置
、、、
android {
defaultConfig {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
}
、、、

dependencies {
androidTestCompile 'com.android.support.test:runner:0.4'
// Set this dependency to use JUnit 4 rules
androidTestCompile 'com.android.support.test:rules:0.4'
// Set this dependency to build and run Espresso tests
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
// Set this dependency to build and run UI Automator tests
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
}

、、、
二、 示例

、、、

相关文章

网友评论

      本文标题:Android ,测试支持库

      本文链接:https://www.haomeiwen.com/subject/thhgyqtx.html