infinum android talks #19 - stop wasting time fixing bugs with tdd by domagoj korman
TRANSCRIPT
We're an independent design & development agency.
Stop wasting time fixing bugs with TDD
DOMAGOJ KORMAN
PROBLEMS
SOLUTION
WHAT WE USE
Robolectric - mocks Android
Mock Web Server - web server for testing
Dagger - dependency injection
THE NOOB
Several months of experience
Never wrote a single Robolectric test
Robolectric was black magic
“Hey Domagoj! You are starting on a new project
next week. Do you want to learn to write tests?”
“Hey Domagoj! You are starting on a new project
next week and you will have to write tests.”
PROJECT SPECIFICS
Dynamic layout based on API responses
Multiple user types
API still not ready
FRUSTRATION BEGINS
How to setup Dagger for tests?
How to setup Robolectric?
How to write tests?
THE ENLIGHTENMENT
HOW DID I DO IT?
1) Create layout 2) Write tests 3) Write application logic 4) Fix layouts 5) Profit
REQUIREMENTS
Experience
API specification
Will to learn Robolectric
TDD BEGINS
You can debug tests!
You can mock all possible responses!
You can test any screen in a matter of seconds!
Any questions? [email protected]
Visit infinum.co or find us on social networks:
infinum.co infinumco infinumco infinum