Reputation: 1285
I am writing an android library project and trying to test it. I found testing a library project more difficult than it has to be using my current method.
Right now, I am exporting the library project into jar file. Then I put it into the libs folder of the test project and the test target project. Then I add it to build path of both projects and run the test.
Every time I make a change to the library I have to do this again. Is there easier way to do this?
Upvotes: 1
Views: 153
Reputation: 4619
There is some reference to this in the google docs. Check out http://developer.android.com/tools/projects/index.html#testing
Basically, the easiest way is to write an application that uses the library project and then add unittests to that application. When creating the tests via eclipse, you can choose to test modules from within your library project. This way, changes to the library project are automatically applied.
Upvotes: 1