What is the difference between these two import statements? (in build.gradle):
testCompile 'junit:junit:4.12'
androidTestCompile 'junit:junit:4.12'
What is the difference between these two import statements? (in build.gradle):
testCompile 'junit:junit:4.12'
androidTestCompile 'junit:junit:4.12'
There's a great answer here explaining the difference:
Simply
testCompileis the configuration for unit tests (located insrc/test) andandroidTestCompileis used for the test API (located insrc/androidTest)....
The main distinction between the two is the
testsourceset runs in a regular Java JVM, whereas theandroidTestsourceset tests run on an Android device (or an emulator).