i need to create e unit test project for my application.my app name is MyLibApp.it is refering a library project Android_Client.every controls and codings are done in this library project.i have tried different ways to create a test project for this library project.but none of them is working.please anybody tell me how can i do this?
Asked
Active
Viewed 270 times
1
-
Check out the Q&A [here](http://stackoverflow.com/questions/10301592/stand-alone-test-project-for-a-library-project-on-android) and see if it helps. – yorkw May 25 '12 at 21:57
2 Answers
1
For me it worked best to connect the test project against an app project, which uses the library. Otherwise it wouldn't refresh the apk on changes. Just write a simple wrapper app that uses your library and test against that one.

koljaTM
- 10,064
- 2
- 40
- 42
1
Shameless plug alert
I actually ran into this problem, too. Unfortunately, JUnit and other testing libraries aren't able to test libraries.
Fortunately, I created a solution called "Alt H" (Android Library Test Harness), available at gitorious: https://gitorious.org/alth.
It's still in development and the documentation is a little lacking, so feel free to hit me up if you have any questions.

i41
- 311
- 2
- 9