Usually i run a junit test using adb shell am instrument -w com.android.contacts.tests/android.test.InstrumentationTestRunner
. And it actually works, it will run al
To Debug Android JUnit test don't forget to put debuggable=true
in the testable project.
I found the answer just now. It will block when i start instrument since it is waiting for me to set a breakpoint. So After i make a breakpoint, then the junit start to run. So the sequence of debug a android junit project is :
I guess you are trying to debug your tests using Eclipse. If this is the case you can just select you test project, right click, Debug As... -> Android JUNit test and the execution will stop at the breakpoints you set in your tests or in your code.