mardi 26 juillet 2016

Use debug assets in releseUnitTest instead of the release app assets

I run my unit tests with robolectric. For some test I added json files in the debug assest folder and get them via: RuntimeEnvironment.application.getResources().getAssets().open(filename);

In the debugUnitTest I have access to the the debugAssests, but if I run my releaseUnitTest I don't.

How can I tell the releaseUnitTest to get the assets from the debug folder? Or where would you save the json files to use them in the unit tests?

Aucun commentaire:

Enregistrer un commentaire