When developing for Android, is there any point to having a test project as a normal Java module, so when run doesn’t actually run on the emulator/device?
I had the idea to create an Android test project/module for items which depend on Android context, and a normal Java project/module for tests which have no reliance on Android itself.
Is it worth doing this or am I opening myself up for potential pain by not having the test code run on the device.
Note I come from a .Net background so my Java experience is pretty slim.
When I develop for Android, I find this very helpful. There are some functions that do not require hardware based events, but just data. If you can come up with robust test data, this can be an easy, painless way to regression test your code and be confident that you haven’t introduced any bugs into existing components.