mardi 24 mars 2015

Sharing resources across unit tests and instrumentation tests in Android

Now that Google has added experimental unit test support, how might one go about sharing resources across both unit tests and instrumentation test?


For example, say I have a TestUtils.java class that I want accessible in both my unit tests and my instrumentation tests. If I put it in my src/test/java folder, it will be accessible to my unit tests. If I put it in my src/androidTest/java folder, it will be accessible to my instrumentation tests. How do I make it accessible to both?


The only solution I see right now is putting it in src/debug/java, but is there a better way?


Aucun commentaire:

Enregistrer un commentaire