Eclipse + Android + Junit Test References Android.os Class = Noclassdeffounderror
I have a custom timer that extends android.os.CountDownTimer. I have a test in the test project (standard Android/Eclipse project config) that tests the custom Timer. When I run th
Solution 1:
You can't do that because it isn't possible to test Android's resources with JUnit without further instructions. You have to instrument your project first. This tutorials and the following describes this procedure very well:
http://mylifewithandroid.blogspot.com/2008/11/controlling-instrumentation.htmlhttp://mylifewithandroid.blogspot.com/2008/11/junit-in-android.html
Here is an explained code snipplet of another test project: http://marakana.com/tutorials/android/junit-test-example.html
And here you can find the answer on Stack Overflow: https://stackoverflow.com/questions/522312/best-practices-for-unit-testing-android-apps
Post a Comment for "Eclipse + Android + Junit Test References Android.os Class = Noclassdeffounderror"