Howto run Android app locally with test app specified mock implementation of a service
Using an interface I can have activities interact with a mock o开发者_JAVA百科bject in unit tests.
However, my issue is that my mock service is providing an alternative data set which cannot be browsed by me via the running app (when conceiving a new test) without the app knowing about the mock class.. which it doesn't because it resides in the test application, not the application. Does anyone know how to run the android app in "test mode" .. ie, as you would see it when the unit tests (ActivityInstrumentationTestCase2) are run against the mock service?
精彩评论