There are many occasions where your Android application relies on external XML or JSON messages or documents obtained from web services. These documents are used for data interchange between the local application and the server. There are many use cases where XML or JSON documents are generated by the local application to be sent to the server. Ideally, methods invoked by these activities have to be tested in isolation to have real unit tests and to achieve this we need to include some mock files somewhere in our APK to run the tests.
But the question is where can we include these files ?
Let's find it out.
Read the complete article in Google Docs: