Delivering updates with confidence; shortening time to market; writing clean and correct code every day: this is the promise of Test-Driven Development. But, it’s not easy to do TDD in Android. You have to either run the tests on the device, or install a complex framework that mimics the Android APIs. Both options slow you down.
In this session we’ll get back to the roots of TDD and show how to deal with this problem. We’ll learn time-tested techniques that greatly reduce the need to run tests on the device. The good side-effect of these techniques is that our code becomes simpler and better. We’ll learn about old workhorses such as presenter-first, model-view separation, humble dialog box and spikes.
I will present an example of how to test-drive a drawing application that supports multi-touch.
Warning: this is not a session about testing! It’s about writing well-written, well-designed code. Testing is important, but it’s not our focus here; we use test to drive the design.
This session’s material is from my training course http://www.avanscoperta.it/it/training/tdd-android/ and our upcoming book https://leanpub.com/tddforandroid