osx - Android Studio "No tests were found" -


has been able tests run in android studio (from gui , not terminal), have been unable run tests gui.

everytime try run tests through gui following message:

enter image description here

i able run tests terminal using following command:

./gradlew connectedandroidtest 

i running android studio 0.5.2 gradle 1.11 plugin 0.9.0 on mac osx

my project structure follows;

myproject/    src/       androidtest/          java/              com.myproject.app.test/                 … (tests source code) …       main/          java/              com.myproject.app/                 … (source code) …          res/                 … (resources code) …    build.gradle 

my build.gradle file looks similar following:

… android {     compilesdkversion 19     buildtoolsversion "19.0.1"      defaultconfig {         versioncode 12         versionname "2.0"         minsdkversion 9         targetsdkversion 19            testpackagename "com.test.foo"         testinstrumentationrunner "android.test.instrumentationtestrunner"     } } … 

if has suggestions, more happy here them.

today had same problem espresso tests , getting me crazy because seemed normal. discovered problem because method annotated @beforeclass (annotation used mark method has executed before of tests methods in class) throwing exception. reason took me more time expected got because if goes wrong in method stacktrace of exception not shown in log window of run tab in log window of android monitor tab

if want reproduce problem add testing class:

@beforeclass public static void setupclass() {     throw new runtimeexception("sorry dude, won't find test!"); } 

Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -