lundi 4 mai 2015

Testing an Android library with Robolectric

I created a library which can be used in an Android environment. At the moment it contains Plain Old Groovy Objects, there are no Android dependencies. Tests for those POGOs run without problems.

To extend the library's features I create classes which inherit from Android classes or rely on them, I want to test those too. Of course tests should be part of the library and should not be implemented as a part of an Android application project which includes the library.

I know that an application can be tested with the help of Robolectric and it works pretty well but I see no possibility of using it without a whole Android application behind it.

Is there a way to test a library with Android dependencies and Robolectric?

I am using Android Studio 1.2.

Aucun commentaire:

Enregistrer un commentaire