11. Android & TDD
● Android Instrumentation Unit Testing
○ Pretty slow by unit test standards
○ We still have to maintain a
separate infrastructure for
tablet <-> tablet interaction
17. Robolectric
● Mimics Android functionality
● 2.0 includes Android code (4.2.1 rc1)
● Provides view into Android internals
● Extendable with ‘Shadows’
18. Robolectric @ Amplify
● 4500 unit tests across our Android Apps
● Most in a single repo: 3751
○ Runs in 6.5 minutes (Macbook Pro)
○ Migration to Robolectric 2.0 took a part-time dev
about 3 weeks
○ Worth it
● Devs run unit tests in IntelliJ
20. More Unit Testing @ Amplify
● RoboGuice
○ Based on Google Guice
○ Dependency injection for Android
● Mockito
○ Standard Java Mock library
● Android FEST
○ Assertion library by Square