Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
180
Observability-Driven Development: What DevOps is Really About
gshackles
1
300
Monitoring Your Mobile Apps in the Wild
gshackles
1
100
Building Scalable Applications with the Actor Model
gshackles
0
650
Creating a Voice-Driven TV Remote with Azure and Alexa
gshackles
0
130
Build 2017 Recap for Xamarin Developers
gshackles
0
130
Going Serverless: Event-Driven Architecture Without The Infrastructure
gshackles
0
190
Evolve 2016 Redux
gshackles
0
150
Instrumenting Your Mobile Monitoring Strategy
gshackles
0
4.7k
Other Decks in Technology
See All in Technology
生成AIシステムとAIエージェントに関する性能や安全性の評価
shibuiwilliam
2
310
2025 DORA Reportから読み解く!AIが映し出す、成果を出し続ける組織の共通点 #開発生産性_findy
takabow
2
990
なぜフロントエンド技術を追うのか?なぜカンファレンスに参加するのか?
sakito
8
1.9k
「え?!それ今ではHTMLだけでできるの!?」驚きの進化を遂げたモダンHTML
riyaamemiya
9
4.1k
Symfony AI in Action
el_stoffel
2
340
ECMAScript仕様の最新動向: プロセスの変化と仕様のトレンド
uhyo
2
310
あなたの知らないDateのひみつ / The Secret of "Date" You Haven't known #tqrk16
expajp
0
110
useEffectってなんで非推奨みたいなこと言われてるの?
maguroalternative
9
6.1k
GitHub を組織的に使いこなすために ソニーが実践した全社展開のプラクティス
sony
21
11k
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
9.8k
Kill the Vibe?Architecture in the age of AI
stoth
1
160
Modern Data Stack大好きマンが語るSnowflakeの魅力
sagara
0
260
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
174
15k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
A designer walks into a library…
pauljervisheath
210
24k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
A Tale of Four Properties
chriscoyier
162
23k
Producing Creativity
orderedlist
PRO
348
40k
Designing Experiences People Love
moore
142
24k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Optimizing for Happiness
mojombo
379
70k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
The Cost Of JavaScript in 2023
addyosmani
55
9.3k
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