Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Keeping Your Users Happy With Testable Apps
Search
Greg Shackles
April 20, 2013
Technology
1
450
Keeping Your Users Happy With Testable Apps
Given at Xamarin Evolve on April 16, 2013
Greg Shackles
April 20, 2013
Tweet
Share
More Decks by Greg Shackles
See All by Greg Shackles
Building Modern Services with .NET Core 3 and gRPC
gshackles
0
170
Observability-Driven Development: What DevOps is Really About
gshackles
1
280
Monitoring Your Mobile Apps in the Wild
gshackles
1
97
Building Scalable Applications with the Actor Model
gshackles
0
630
Creating a Voice-Driven TV Remote with Azure and Alexa
gshackles
0
120
Build 2017 Recap for Xamarin Developers
gshackles
0
120
Going Serverless: Event-Driven Architecture Without The Infrastructure
gshackles
0
190
Evolve 2016 Redux
gshackles
0
140
Instrumenting Your Mobile Monitoring Strategy
gshackles
0
4.7k
Other Decks in Technology
See All in Technology
AI開発ツールCreateがAnythingになったよ
tendasato
0
110
開発者を支える Internal Developer Portal のイマとコレカラ / To-day and To-morrow of Internal Developer Portals: Supporting Developers
aoto
PRO
1
410
AWS環境のリソース調査を Claude Code で効率化 / aws investigate with cc devio2025
masahirokawahara
2
1.4k
「何となくテストする」を卒業するためにプロダクトが動く仕組みを理解しよう
kawabeaver
0
270
大「個人開発サービス」時代に僕たちはどう生きるか
sotarok
20
9.5k
テストを軸にした生き残り術
kworkdev
PRO
0
190
【Grafana Meetup Japan #6】Grafanaをリバプロ配下で動かすときにやること ~ Grafana Liveってなんだ ~
yoshitake945
0
390
Kubernetes における cgroup driver のしくみ: runwasi の bugfix より
z63d
2
250
バッチ処理で悩むバックエンドエンジニアに捧げるAWS Glue入門
diggymo
3
150
今!ソフトウェアエンジニアがハードウェアに手を出すには
mackee
11
4.4k
Automating Web Accessibility Testing with AI Agents
maminami373
0
1.1k
人工衛星のファームウェアをRustで書く理由
koba789
6
2.6k
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
431
66k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
Automating Front-end Workflow
addyosmani
1370
200k
A better future with KSS
kneath
239
17k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.5k
Designing for humans not robots
tammielis
253
25k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Typedesign – Prime Four
hannesfritz
42
2.8k
Building Adaptive Systems
keathley
43
2.7k
Transcript
Greg Shackles OLO @gshackles
[email protected]
github.com/gshackles Keeping Your Users Happy
With Testable Apps
TDD
TDD KISS SOLID BDD DRY SOC YAGNI DDD SRP OCP
LSP ISP DIP XP IOC CQS
None
Why Test?
Stability
Stability • Obvious, but important
Stability • Obvious, but important • Refactor and iterate with
a safety net
Stability • Obvious, but important • Refactor and iterate with
a safety net • Compilation is only the first unit test
Stability • Obvious, but important • Refactor and iterate with
a safety net • Compilation is only the first unit test • Verify cross-platform compatibility
“I don’t have time to write tests!”
“I don’t have time to NOT write tests!”
Once It’s Out, It’s Out
Once It’s Out, It’s Out • This isn’t the web
Once It’s Out, It’s Out • This isn’t the web
• Difficult and expensive to fix
Once It’s Out, It’s Out • This isn’t the web
• Difficult and expensive to fix • Quality bar has been raised
Once It’s Out, It’s Out • This isn’t the web
• Difficult and expensive to fix • Quality bar has been raised • Bad reviews stick with you
The Happy Path
• Improves design The Happy Path
• Improves design • More shared code (not just mobile
apps) The Happy Path
• Improves design • More shared code (not just mobile
apps) • Optimize independently of a platform The Happy Path
• Improves design • More shared code (not just mobile
apps) • Optimize independently of a platform • IterationSpeed++ The Happy Path
• 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
What To Test?
What to Test?
What to Test? • 100% code coverage != the goal
What to Test? • 100% code coverage != the goal
• Test parts that provide value
What to Test? • 100% code coverage != the goal
• Test parts that provide value • Testing platform code can be difficult
What to Test? • 100% code coverage != the goal
• Test parts that provide value • Testing platform code can be difficult • Start small
None
! ! Unit Tests
! ! ! ! Unit Tests Integra-on Tests
! ! ! ! ! ! Unit Tests Integra-on Tests
UI / UX Tests
! ! ! ! ! ! Unit Tests Integra-on Tests
UI / UX Tests Mixed Automated
Unit / Integration Tests
Unit / Integration Tests • Automated
Unit / Integration Tests • Automated • Low friction
Unit / Integration Tests • Automated • Low friction •
Leverage tooling
Unit / Integration Tests • Automated • Low friction •
Leverage tooling • NUnit (Lite)
Unit / Integration Tests • Automated • Low friction •
Leverage tooling • NUnit (Lite) • Run on all platforms
Unit / Integration Tests • Automated • Low friction •
Leverage tooling • NUnit (Lite) • Run on all platforms • Simulator vs Device
Mocking
Mocking • Limited options
Mocking • Limited options • Manual mocking
Mocking • Limited options • Manual mocking • Code generation,
T4 github.com/gshackles/Muntz
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(); ! } }
Manual Testing
Manual Testing • User feedback is critical
Manual Testing • User feedback is critical • UX testing
Manual Testing • User feedback is critical • UX testing
• Exploratory testing
Manual Testing • User feedback is critical • UX testing
• Exploratory testing • TestFlight testflightapp.com
MVVM
MVVM • MvvmCross
MVVM • MvvmCross • Shared, testable view models
MVVM • MvvmCross • Shared, testable view models • Improved
IoC support
MVVM • MvvmCross • Shared, testable view models • Improved
IoC support • Databinding keeps views thin
DEMO
Q&A