Devoxx BE 2016

Testing made sweet with a Mockito by Jeroen Mols

7th November 2016

The past year has been huge for Android testing: Testing support lib, fast JVM unit tests, Espresso test recorder... Having such great tools means writing tests is a breeze! All your apps currently have 80% code coverage, right? Yay! Or wait... is it really? Is all your common logic (networking, databases,...) tested? Do you isolate parts of your code base to keep your tests small? And what about providing relevant testing data?

In order to achieve this, you need to make use of mocks and stubs. And that's exactly what this talk will be about: What is a mock? What's the difference between a mock and a stub? Are mocks the only way to provide relevant data for your unit tests? What do I do with all the final classes/methods in the Android SDK? How do I architect my app to make it easier to test? ...

After having adopted TDD as my main development workflow for almost a year now, I feel comfortable saying everything can be tested. Its just a matter of having someone experience show you how.

Jeroen Mols has a real passion to build things, which continuously challenges him to experiment and learn. In the process refocussed his master in Electrical engineering to become an Android developer. Starting off with highly technical prototypes for Wi-Fi connected products, he build his own file sharing platform (Wi-FileTransfer). Currently he drives the innovation for the official Philips Hue Android and iOS apps.

One of a kind, never-been-done before apps are what he enjoys most and complex systems, highly technical apps have become his expertise. Currently Jeroen helped realize three huge connected products, various high profile apps (e.g. Nieuwsblad), actively contributes to open source and loves interacting with the Android community.