Eugene
Eugene

Reputation: 60184

Android Studio 0.3.5 does not recognise test directory

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?

enter image description here

Upvotes: 2

Views: 713

Answers (1)

waqaslam
waqaslam

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

Related Questions