Keeping your users happy with testable apps - Greg Shackles
-
date post
17-Oct-2014 -
Category
Technology
-
view
761 -
download
1
description
Transcript of Keeping your users happy with testable apps - Greg Shackles
![Page 1: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/1.jpg)
Greg ShacklesOLO@[email protected]
github.com/gshackles
Keeping Your Users Happy
With Testable Apps
Thursday, May 9, 13
![Page 2: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/2.jpg)
TDD
Thursday, May 9, 13
![Page 3: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/3.jpg)
TDDKISSSOLID
BDDDRY
SOC
YAGNI
DDD
SRP OCPLSP ISP
DIPXP
IOC CQS
Thursday, May 9, 13
![Page 4: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/4.jpg)
Thursday, May 9, 13
![Page 5: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/5.jpg)
Why Test?
Thursday, May 9, 13
![Page 6: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/6.jpg)
Stability
Thursday, May 9, 13
![Page 7: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/7.jpg)
Stability
•Obvious, but important
Thursday, May 9, 13
![Page 8: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/8.jpg)
Stability
•Obvious, but important
•Refactor and iterate with a safety net
Thursday, May 9, 13
![Page 9: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/9.jpg)
Stability
•Obvious, but important
•Refactor and iterate with a safety net
•Compilation is only the first unit test
Thursday, May 9, 13
![Page 10: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/10.jpg)
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
![Page 11: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/11.jpg)
“I don’t have time to write tests!”
Thursday, May 9, 13
![Page 12: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/12.jpg)
“I don’t have time to NOT write tests!”
Thursday, May 9, 13
![Page 13: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/13.jpg)
Once It’s Out, It’s Out
Thursday, May 9, 13
![Page 14: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/14.jpg)
Once It’s Out, It’s Out
•This isn’t the web
Thursday, May 9, 13
![Page 15: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/15.jpg)
Once It’s Out, It’s Out
•This isn’t the web
•Difficult and expensive to
fix
Thursday, May 9, 13
![Page 16: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/16.jpg)
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
![Page 17: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/17.jpg)
The Happy Path
Thursday, May 9, 13
![Page 18: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/18.jpg)
•Improves design
The Happy Path
Thursday, May 9, 13
![Page 19: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/19.jpg)
•Improves design
•More shared code (not just mobile apps)
The Happy Path
Thursday, May 9, 13
![Page 20: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/20.jpg)
•Improves design
•More shared code (not just mobile apps)
•Optimize independently of a platform
The Happy Path
Thursday, May 9, 13
![Page 21: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/21.jpg)
•Improves design
•More shared code (not just mobile apps)
•Optimize independently of a platform
•IterationSpeed++
The Happy Path
Thursday, May 9, 13
![Page 22: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/22.jpg)
•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
![Page 23: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/23.jpg)
What To Test?
Thursday, May 9, 13
![Page 24: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/24.jpg)
What to Test?
Thursday, May 9, 13
![Page 25: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/25.jpg)
What to Test?
•100% code coverage != the goal
Thursday, May 9, 13
![Page 26: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/26.jpg)
What to Test?
•100% code coverage != the goal
•Test parts that provide value
Thursday, May 9, 13
![Page 27: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/27.jpg)
What to Test?
•100% code coverage != the goal
•Test parts that provide value
•Testing platform code can be difficult
Thursday, May 9, 13
![Page 28: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/28.jpg)
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
![Page 29: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/29.jpg)
Thursday, May 9, 13
![Page 30: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/30.jpg)
!!Unit Tests
Thursday, May 9, 13
![Page 31: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/31.jpg)
!!
!!
Unit Tests
Integra-on Tests
Thursday, May 9, 13
![Page 32: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/32.jpg)
!!
!!
!!
Unit Tests
Integra-on Tests
UI / UX Tests
Thursday, May 9, 13
![Page 33: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/33.jpg)
!!
!!
!!
Unit Tests
Integra-on Tests
UI / UX Tests Mixed
Automated
Thursday, May 9, 13
![Page 34: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/34.jpg)
Unit / Integration Tests
Thursday, May 9, 13
![Page 35: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/35.jpg)
Unit / Integration Tests
•Automated
Thursday, May 9, 13
![Page 36: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/36.jpg)
Unit / Integration Tests
•Automated
•Low friction
Thursday, May 9, 13
![Page 37: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/37.jpg)
Unit / Integration Tests
•Automated
•Low friction
•Leverage tooling
Thursday, May 9, 13
![Page 38: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/38.jpg)
Unit / Integration Tests
•Automated
•Low friction
•Leverage tooling
•NUnit (Lite)
Thursday, May 9, 13
![Page 39: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/39.jpg)
Unit / Integration Tests
•Automated
•Low friction
•Leverage tooling
•NUnit (Lite)
•Run on all
platforms
Thursday, May 9, 13
![Page 40: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/40.jpg)
Unit / Integration Tests
•Automated
•Low friction
•Leverage tooling
•NUnit (Lite)
•Run on all
platforms
•Simulator vs
Device
Thursday, May 9, 13
![Page 41: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/41.jpg)
Mocking
Thursday, May 9, 13
![Page 42: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/42.jpg)
Mocking
•Limited options
Thursday, May 9, 13
![Page 43: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/43.jpg)
Mocking
•Limited options
•Manual mocking
Thursday, May 9, 13
![Page 44: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/44.jpg)
Mocking
•Limited options
•Manual mocking
•Code generation, T4
github.com/gshackles/
Muntz
Thursday, May 9, 13
![Page 45: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/45.jpg)
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
![Page 46: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/46.jpg)
Manual Testing
Thursday, May 9, 13
![Page 47: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/47.jpg)
Manual Testing
•User feedback is
critical
Thursday, May 9, 13
![Page 48: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/48.jpg)
Manual Testing
•User feedback is
critical
•UX testing
Thursday, May 9, 13
![Page 49: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/49.jpg)
Manual Testing
•User feedback is
critical
•UX testing
•Exploratory testing
Thursday, May 9, 13
![Page 50: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/50.jpg)
MVVM
Thursday, May 9, 13
![Page 51: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/51.jpg)
MVVM
•MvvmCross
Thursday, May 9, 13
![Page 52: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/52.jpg)
MVVM
•MvvmCross
•Shared, testable view models
Thursday, May 9, 13
![Page 53: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/53.jpg)
MVVM
•MvvmCross
•Shared, testable view models
• Improved IoC support
Thursday, May 9, 13
![Page 54: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/54.jpg)
MVVM
•MvvmCross
•Shared, testable view models
• Improved IoC support
•Databinding keeps views thin
Thursday, May 9, 13
![Page 55: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/55.jpg)
DEMOThursday, May 9, 13
![Page 56: Keeping your users happy with testable apps - Greg Shackles](https://reader031.fdocuments.net/reader031/viewer/2022012922/5441acdbafaf9f5a208b4776/html5/thumbnails/56.jpg)
Q&AThursday, May 9, 13