开发者

Howto run Android app locally with test app specified mock implementation of a service

开发者 https://www.devze.com 2023-04-02 19:29 出处:网络
Using an interface I can have activities interact with a mock o开发者_JAVA百科bject in unit tests.

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号