官方地址: https://developer.android.com/training/testing/ui-testing/espresso-testing.html https://google.github.io/android-testing-support-library/docs/index.html
github samples: https://github.com/googlesamples/android-testing
自定义更改android test目录
当app的结构是从eclipse转过来的时候默认是没有android test目录的,这时候就需要自己手动去更改目录
1.首先创建androidtest的文件夹
2.build.gradle修改目录
sourceSets {
...
androidTest
{
java.srcDirs = ['androidTest']
}
.....
}
['androidTest'] androidTest就是我自己新建的目录