Keeping your users happy with testable apps - Greg Shackles
-
date post
17-Oct-2014 -
Category
Technology
-
view
757 -
download
1
description
Transcript of Keeping your users happy with testable apps - Greg Shackles
Greg ShacklesOLO@[email protected]
github.com/gshackles
Keeping Your Users Happy
With Testable Apps
Thursday, May 9, 13
TDD
Thursday, May 9, 13
TDDKISSSOLID
BDDDRY
SOC
YAGNI
DDD
SRP OCPLSP ISP
DIPXP
IOC CQS
Thursday, May 9, 13
Thursday, May 9, 13
Why Test?
Thursday, May 9, 13
Stability
Thursday, May 9, 13
Stability
•Obvious, but important
Thursday, May 9, 13
Stability
•Obvious, but important
•Refactor and iterate with a safety net
Thursday, May 9, 13
Stability
•Obvious, but important
•Refactor and iterate with a safety net
•Compilation is only the first unit test
Thursday, May 9, 13
Stability
•Obvious, but important
•Refactor and iterate with a safety net
•Compilation is only the first unit test
•Verify cross-platform compatibility
Thursday, May 9, 13
“I don’t have time to write tests!”
Thursday, May 9, 13
“I don’t have time to NOT write tests!”
Thursday, May 9, 13
Once It’s Out, It’s Out
Thursday, May 9, 13
Once It’s Out, It’s Out
•This isn’t the web
Thursday, May 9, 13
Once It’s Out, It’s Out
•This isn’t the web
•Difficult and expensive to
fix
Thursday, May 9, 13
Once It’s Out, It’s Out
•This isn’t the web
•Difficult and expensive to
fix
•Quality bar has been
Thursday, May 9, 13
The Happy Path
Thursday, May 9, 13
•Improves design
The Happy Path
Thursday, May 9, 13
•Improves design
•More shared code (not just mobile apps)
The Happy Path
Thursday, May 9, 13
•Improves design
•More shared code (not just mobile apps)
•Optimize independently of a platform
The Happy Path
Thursday, May 9, 13
•Improves design
•More shared code (not just mobile apps)
•Optimize independently of a platform
•IterationSpeed++
The Happy Path
Thursday, May 9, 13
•Improves design
•More shared code (not just mobile apps)
•Optimize independently of a platform
•IterationSpeed++
•FACT: Green tests are good for the soul
The Happy Path
Thursday, May 9, 13
What To Test?
Thursday, May 9, 13
What to Test?
Thursday, May 9, 13
What to Test?
•100% code coverage != the goal
Thursday, May 9, 13
What to Test?
•100% code coverage != the goal
•Test parts that provide value
Thursday, May 9, 13
What to Test?
•100% code coverage != the goal
•Test parts that provide value
•Testing platform code can be difficult
Thursday, May 9, 13
What to Test?
•100% code coverage != the goal
•Test parts that provide value
•Testing platform code can be difficult
•Start small
Thursday, May 9, 13
Thursday, May 9, 13
!!Unit Tests
Thursday, May 9, 13
!!
!!
Unit Tests
Integra-on Tests
Thursday, May 9, 13
!!
!!
!!
Unit Tests
Integra-on Tests
UI / UX Tests
Thursday, May 9, 13
!!
!!
!!
Unit Tests
Integra-on Tests
UI / UX Tests Mixed
Automated
Thursday, May 9, 13
Unit / Integration Tests
Thursday, May 9, 13
Unit / Integration Tests
•Automated
Thursday, May 9, 13
Unit / Integration Tests
•Automated
•Low friction
Thursday, May 9, 13
Unit / Integration Tests
•Automated
•Low friction
•Leverage tooling
Thursday, May 9, 13
Unit / Integration Tests
•Automated
•Low friction
•Leverage tooling
•NUnit (Lite)
Thursday, May 9, 13
Unit / Integration Tests
•Automated
•Low friction
•Leverage tooling
•NUnit (Lite)
•Run on all
platforms
Thursday, May 9, 13
Unit / Integration Tests
•Automated
•Low friction
•Leverage tooling
•NUnit (Lite)
•Run on all
platforms
•Simulator vs
Device
Thursday, May 9, 13
Mocking
Thursday, May 9, 13
Mocking
•Limited options
Thursday, May 9, 13
Mocking
•Limited options
•Manual mocking
Thursday, May 9, 13
Mocking
•Limited options
•Manual mocking
•Code generation, T4
github.com/gshackles/
Muntz
Thursday, May 9, 13
01
02
03
04
05
06
07
08
09
10
11
12
13
14
Mocking
interface IService{! string Foo(string bar);}!class MockService : IService{! public Func<string> FooBody { get; set; }! !! public Foo(string bar)! {! ! return FooBody();! }}
Thursday, May 9, 13
Manual Testing
Thursday, May 9, 13
Manual Testing
•User feedback is
critical
Thursday, May 9, 13
Manual Testing
•User feedback is
critical
•UX testing
Thursday, May 9, 13
Manual Testing
•User feedback is
critical
•UX testing
•Exploratory testing
Thursday, May 9, 13
MVVM
Thursday, May 9, 13
MVVM
•MvvmCross
Thursday, May 9, 13
MVVM
•MvvmCross
•Shared, testable view models
Thursday, May 9, 13
MVVM
•MvvmCross
•Shared, testable view models
• Improved IoC support
Thursday, May 9, 13
MVVM
•MvvmCross
•Shared, testable view models
• Improved IoC support
•Databinding keeps views thin
Thursday, May 9, 13
DEMOThursday, May 9, 13
Q&AThursday, May 9, 13