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
450
1
Share
Keeping Your Users Happy With Testable Apps
Given at Xamarin Evolve on April 16, 2013
Greg Shackles
April 20, 2013
More Decks by Greg Shackles
See All by Greg Shackles
Building Modern Services with .NET Core 3 and gRPC
gshackles
0
210
Observability-Driven Development: What DevOps is Really About
gshackles
1
330
Monitoring Your Mobile Apps in the Wild
gshackles
1
120
Building Scalable Applications with the Actor Model
gshackles
0
670
Creating a Voice-Driven TV Remote with Azure and Alexa
gshackles
0
140
Build 2017 Recap for Xamarin Developers
gshackles
0
140
Going Serverless: Event-Driven Architecture Without The Infrastructure
gshackles
0
210
Evolve 2016 Redux
gshackles
0
160
Instrumenting Your Mobile Monitoring Strategy
gshackles
0
4.7k
Other Decks in Technology
See All in Technology
社内エンジニア勉強会の醍醐味と苦しみ/tamadev
nishiuma
0
240
VespaのParent Childを用いたフィードパフォーマンスの改善
taking
0
110
20260428_Product Management Summit_Loglass_JoeHirose
loglassjoe
3
3.8k
PicoRuby as a Multi-VM Operating System
kishima
1
210
マルチプロダクトの信頼性を効率良く保っていくために
kworkdev
PRO
0
170
生成AI時代のドキュメントに対する期待の整理と実践から得た学び / Rethinking Documentation for LLM: Lessons from Practice
bitkey
PRO
1
100
実践ハーネスエンジニアリング:TAKTで実現するAIエージェント制御 / Practical Harness Engineering: AI Agent Control Enabled by TAKT
nrslib
13
4.9k
生成AIが変える SaaS の競争原理と弁護士ドットコムのプロダクト戦略
bengo4com
1
2.3k
【技術書典20】OpenFOAM(自宅で深める流体解析)流れと熱移動(2)
kamakiri1225
0
150
EMから幅を広げるために最近挑戦していること / Recent challenges I'm undertaking to expand my horizons beyond EM
hiro_torii
1
130
ServiceNow Knowledge 26 の歩き方
manarobot
0
180
Agents CLI と Gemini Enterprise Agent Platform で マルチエージェント開発が楽しくなる!
kaz1437
0
150
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
510
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
340
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Code Reviewing Like a Champion
maltzj
528
40k
Code Review Best Practice
trishagee
74
20k
Faster Mobile Websites
deanohume
310
31k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
New Earth Scene 8
popppiees
3
2.1k
Music & Morning Musume
bryan
47
7.2k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Utilizing Notion as your number one productivity tool
mfonobong
4
290
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