Mock server requests Android Espresso UI Testing

后端 未结 1 1454
囚心锁ツ
囚心锁ツ 2021-01-06 00:01

I am using Espresso to write UI tests for my Android application and would like to mock http requests using MockWebServer. I need to mock authentication responses and sign

相关标签:
1条回答
  • 2021-01-06 00:49

    This example of replacing dependency with Dagger. But you can use any other approaches for DI. Main idea - replace dependency during test by providing a "test" version of you application via custom test runner.

    0 讨论(0)
提交回复
热议问题