andro-girl
andro-girl

Reputation: 8129

how to create test project for library project in android

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?

Upvotes: 1

Views: 272

Answers (2)

i41
i41

Reputation: 311

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.

Upvotes: 1

koljaTM
koljaTM

Reputation: 10260

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.

Upvotes: 1

Related Questions