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
440
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
150
Observability-Driven Development: What DevOps is Really About
gshackles
1
270
Monitoring Your Mobile Apps in the Wild
gshackles
1
78
Building Scalable Applications with the Actor Model
gshackles
0
550
Creating a Voice-Driven TV Remote with Azure and Alexa
gshackles
0
88
Build 2017 Recap for Xamarin Developers
gshackles
0
84
Going Serverless: Event-Driven Architecture Without The Infrastructure
gshackles
0
160
Evolve 2016 Redux
gshackles
0
120
Instrumenting Your Mobile Monitoring Strategy
gshackles
0
4.6k
Other Decks in Technology
See All in Technology
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
SREによる隣接領域への越境とその先の信頼性
shonansurvivors
2
510
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.1k
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
720
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
Taming you application's environments
salaboy
0
180
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
220
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
0
110
Evangelismo técnico: ¿qué, cómo y por qué?
trishagee
0
360
スクラム成熟度セルフチェックツールを作って得た学びとその活用法
coincheck_recruit
1
140
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Statistics for Hackers
jakevdp
796
220k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Unsuck your backbone
ammeep
668
57k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
Building Applications with DynamoDB
mza
90
6.1k
Become a Pro
speakerdeck
PRO
25
5k
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