Test coverage report for Android application

Update: see newer article about Unit test coverage report with Travis CI for Robolectric on Android. For a long time, I wasn’t able to find the right way to generate test coverage reports for Android instrumentation unit tests created with AndroidJUnit4 runner. In the past I’ve found many solutions, but none of them was working or they were compatible only with Robolectric, which I currently don’t use. Other developers also stopped using it for the new projects....

June 3, 2015 · 3 min · 498 words · Piotr Wittchen

Mockito on Android

Overview When we write unit tests for an Android application, sometimes there’s a necessity to mock some classes or interfaces. Instead of writing implementations dedicated for unit tests by hand, we can use Mockito library. We can read article about Mockito on Android on Square’s blog. Mockito can make our tests cleaner and better. It can be used both in classic Java projects and Android projects. It’s one of the most popular mocking framework in Java and if you’re a Java developer who writes unit tests and tries to apply TDD approach, you should be familiar with it....

March 15, 2015 · 2 min · 291 words · Piotr Wittchen