Search code examples
androidunit-testingtestinginstrumentationandroid-instrumentation

Which is the best framework for instrumentation testing in android?


From my experience found that unit test have many limitations like initialisation of objects in the class to be tested. Is instrumentation test gain over unit test?


Solution

  • Both have their merits, and you should be using both.

    You should unit test as much as possible, and use instrumental tests to cover entire flows.

    It really depends on how you structure your app, if you don't do it correctly, you'll run into issues trying to do unit testing.