AS+Espresso的Android自动化测试搭建记录
作者:
额了个去 | 来源:发表于
2016-09-23 12:39 被阅读0次
在过去的开发中对于自动化测试很少接触,本次也是开始学习,选择了Espresso这个Google提供的自动化测试框架,基于Junit扩展Instrumentation的Espresso框架很强大;下面记录一下本次搭建和过程中遇到的问题;本文只为记录,后续还会有补充。
第一步在app/build.gradle中添加如下代码:
1、在defaultConfig中添加如下代码:

build.gradle中的defaultConfig节点
2、添加如下配置:目的是在编译的时候避免冲突:(什么冲突呢?尚待研究)

build.gradle
3、在dependencies中添加如下Espress支持:

support-annotations的版本要与com.android.support:appcompat-v7:23.1.1版本一致
本文标题:AS+Espresso的Android自动化测试搭建记录
本文链接:https://www.haomeiwen.com/subject/vjytyttx.html
网友评论