简体   繁体   中英

Run Robolectric tests from IDEA

I'm trying to run RobolectricSample RobolectricDemoProject project with IDEA and i got error

Class not found: "de.peterfriese.robolectricdemo.MainActivityTest" Process finished with exit code 1

but when i use gradle test command all is ok. this is my Junit config

now, in IDEA you have using non gradle project. That mean you can look on project structure (Ctrl+Shift+Alt+S) and look on Library visibility. (Runtime, Provided,etc) also export property are exist. When library are provided or no exported, it will be absent in target apk.

Also you can build project as gradle test project. so IDEA will use your gradle test target. Build will take litle more time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM