Unittesting without Robolectric

Best Practices / Code Quality
06/16/2016 -
11:00 to 11:45
Stage 3

Session abstract: 


In the last years android developers became more and more aware of unit testing.

Robolectric was a great help to most of us. As for a long time you could not write any tests running in JVM. Nowadays Google officially supports unit testing. 

But seems we have forgotten how to write them without Robolectric. We got used to the magic it offers and in result we write tests that are not real unit tests anymore. And when  Robolectric became flaky our tests became flaky and we need to repair them a lot. Our tests could even run much faster without it.

What's the best approach to replace your Robolectric? Are there reasons to keep it and when? How should you write an app to be testable without any need for Robolectric. How can I test android specific classes out of scope of pure Java?

Session Audio: 

Session Slide: