Reputation: 60184
I have a standard folders structure just like Android Studio creates for a new project. In my build.gradle
I wrote:
sourceSets {
instrumentTest.setRoot('scr/test')
}
Nonetheless the dir doesn't recognised as Test Root, it is not green. Although ./gradlew testDebug
runs test from that folder. Is it a bug in Android Studio? My settings?
Upvotes: 2
Views: 713
Reputation: 68177
I'm not sure what exactly the code does, but comparing it with your directory structure, in a first glance I'm noticing the difference in directory name.
sourceSets {
instrumentTest.setRoot('src/test') //its src, not scr
}
Perhaps that's causing the problem :)
Upvotes: 4