Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
利用TDD來發大財吧~
Search
PeterDin
October 01, 2019
Programming
18
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
利用TDD來發大財吧~
PeterDin
October 01, 2019
Other Decks in Programming
See All in Programming
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
140
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
160
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
430
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
Kotlinの15年とServer-Side Kotlin
n_takehata
1
150
R8 の設定見直しでアプリサイズ削減
andpad
0
220
JIS keyboard support in Omarchy
lef237
0
110
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
220
気持ちぃ〜角丸 Squircle
ryu1013
0
310
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
220
Featured
See All Featured
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
500
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
We Are The Robots
honzajavorek
0
400
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
800
Optimizing for Happiness
mojombo
378
71k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
540
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
What's in a price? How to price your products and services
michaelherold
247
13k
The Curious Case for Waylosing
cassininazir
1
570
Bash Introduction
62gerente
615
220k
Un-Boring Meetings
codingconduct
0
460
Designing for humans not robots
tammielis
254
26k
Transcript
利用TDD來發大財吧 講者: Steve & DinDin
專案URL https://github.com/peter6601/TDDFaDaTsaiDemo.git 掃描後,用AirDrop分享到電腦
講者介紹 Steve iOS Developer @ Hootsuite DinDin iOS Developer @
…..
助教介紹 Howard iOS Developer Kyle iOS Developer ? !
今天將學到 • TDD • 如何做測試開發 • Mock API Calls •
Dependency Injections • A little bit of no MVC (Massive View Controller) • 然後有機會發大財 XDDD~~~
TDD 驅動測試開發
標準開發流程 開發 測試 發佈
???開發流程 開發 發佈 測試
???開發流程 開發 發佈 神秘超自然力量 導致測試的消失 這個答案你知我知 只有你的老闆不知
???開發流程 測試 表示: ......幫復
對面測試 接受測試 處理測試
TDD開發流程 測試 開發 發佈
如何開始?
起手式 先寫測試
如何進行?
None
紅燈停 綠燈行 紅燈先停並做修正 綠燈繼續下一題 or 優化
None
更完整流程?
TDD 1. Wrtie Test 2. Test Fails 3. Write Code
4. Test Passe s 5. Refac tor
深入概念 先寫下測試的例子(Test Case) 跑測試,出現紅燈 開始寫開發的功能 寫的功能測試到綠燈 開始寫下一個功能的測試 或是對這個功能做重構
TDD 一種開發方法,非測試方法 規格本身為可執行的文件
TDD思維 需求 規格 or 功能 可測試文件
TDD 難處 如何定義規格 如何變成可執行的規格 如何使其團隊導入 重構
測試 Unit Test
Unit Tests / Intergration Tests / UI Tests
為什麼大家普遍不愛寫 Tests? • 麻煩 • 麻煩 • 很煩
Code 無法 Test (我是說........可能假設) • 所有的 Code 都在 ViewController •
一個 function 裡有太多事情發生 • Network calls 全部參雜在裡面
Unit Tests 重點 • 快狠準 • Mock Network requests •
Prevent breaking changes • 還有... • 很多講不完 XDDD
發大財 Coding Time
TDD思維 需求
需求 想要發大財
需求
需求 買樂透
需求 開發出 「隨機丟出符合自己期待數字組」 樂透APP
需求 選出合理數字 包含我要的數字 去掉我不想要的數字 想要有連號可能
TDD思維 需求 規格 or 功能
規格 選出數字在使用者規定的範圍 選出數字包含使用者想要的數字 選出數字去掉使用者不想要的數字 選出數字包含某數字開始後連續多個號碼
TDD思維 需求 規格 or 功能 可測試文件
可測試規格 詳情請見專案Test
Q&A