Skip to content Skip to sidebar Skip to footer

Android Local Tests Vs Instrumented Test

I'm trying to check if my API is available within a unit test, to be sure that it responds with 200. Now, my problem is that I'm not really sure when to use Local Test and when I h

Solution 1:

The decision of whether to run your tests on a local JVM on your development machine or on an Android device/emulator is not based on whether your code is synchronous or not. Usually you would only want to run unit tests locally, as it's a lot faster and allows you to use TDD. Your tests do network requests, so they're not unit tests per say, since they have the dependency on the server - they are integration tests. It's preferable to run integration tests on an Android device to get better feedback.


Post a Comment for "Android Local Tests Vs Instrumented Test"