Who am I?
• GDG Organizer
• Android, Agile and
• NFC Actions App
• Mobile Developer
• Why testing?
• Types of tests
• What to test on Android
• Tools for testing
– Test Framework
• Testing increases the level of
conﬁdence in your code.
• Testing makes it possible to write new
code, and refactor existing code,
without worrying that you’ve broken
Testing on Android… Tools…
• Test Framework
• JUnit is an open source framework
that has been designed for the purpose
of writing and running unit tests in
• Mocking Frameworks allow us to test
the code you want, without its
• Mock objects can simulate the
behaviour of complex objects.
• Mock objects isolate the unit of code
you are testing.
• Robolectric is a unit test framework
that de-fangs the Android SDK jar so
you can test-drive the development of
your Android app.
• It rewrites Android SDK classes as
they're being loaded and making it
possible for them to run on a regular