我正在使用。
androidTestCompile 'com.android.support.test:runner:0.3'
androidTestCompile 'com.android.support.test:rules:0.3'
androidTestCompile 'com.android.support:support-annotations:23.0.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2'
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2') {
// this library uses the newest app compat v22 but the espresso contrib still v21.
// you have to specifically exclude the older versions of the contrib library or
// there will be some conflicts
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude module: 'recyclerview-v7'
}
androidTestCompile 'junit:junit:4.12'
我正在进行测试,想知道是否有一种方法可以让Espresso打印一个日志,显示测试的开始和结束,这样如果出现问题,就可以很容易地查看logcat。
这将与Papertrail混合使用,以检查为什么测试失败以及在哪里失败,尤其适用于私有集成服务器。
TestRunner I started: successCloseView
- Daniel Gomez Rico