I have setup an android test project that runs junit tests. It\'s using two eclipse projects \"Application\" and \"ApplicationTest\" where my tests are in the \"ApplicationT
I derived the test case as follows:
class MyTest extends InstrumentationTestCase {
void setUp() {
InputStream is = getInstrumentation().getContext().getAssets()
.open("test_image.bmp");
...
}
}
And the file test_image.bmp is saved in assets directory, which is reasonable if you intend to use the asset for some testing related work - and its not part of ui resources. The technique is used in another context here: https://stackoverflow.com/a/4570206/1577626