Brandon Lu
LINE TECH FRESH
Software Engineer Intern
Software Engineer
Architecture Research Intern
Software Engineer Intern
Backend Engineer Intern
@LINE
@CeranaStudio
@Sunbird
@Advantech
@iStaging
SBS + GLC
Slide 3
Slide 3 text
01
02
03
04
ATDD 如何補⾜ TDD?
ATDD 如何溝通需求?
ATDD 如何檢驗需求有被達成?
What is TDD?
05 總結
CONTENT
Slide 4
Slide 4 text
SECTION 01
What is TDD?
Slide 5
Slide 5 text
Write a
failing test
What is TDD?
Test Driven Development
Slide 6
Slide 6 text
Write a
failing test
What is TDD?
Pass the
test
Test Driven Development
Slide 7
Slide 7 text
Write a
failing test
What is TDD?
Pass the
test
Refactor
Test Driven Development
Slide 8
Slide 8 text
Write a
failing test
Pass the
test
Refactor
Think first
More testable
code
Code Quality UP!
Confident to
deliver/refactor
Test Driven Development
What is TDD?
Slide 9
Slide 9 text
Why don’t you run TDD?
Slide 10
Slide 10 text
Why don’t you run TDD?
Self-discipline
Slide 11
Slide 11 text
Why don’t you run TDD?
Self-discipline
What to test?
What are the
test cases?
Slide 12
Slide 12 text
SECTION 02
來看看 ATDD 如何補⾜ TDD?
Meet ATDD
What to
test?
What are the
test cases?
Slide 13
Slide 13 text
Meet ATDD
What to
test?
What are the
test cases?
Spec By
Example
User Story
Slide 14
Slide 14 text
Meet ATDD
What to
test?
What are the
test cases?
A
C
1
A
C
2
A
C
*
N
Spec By Example
User Story
Slide 15
Slide 15 text
Meet ATDD
What to
test?
What are the
test cases?
User Story
AC 1 AC 2 AC *N
Spec By Example
Acceptance Criteria
Slide 16
Slide 16 text
Meet ATDD
What to
test?
What are the
test cases?
User Story
AC 1 AC 2 AC *N
Spec By Example
TDD TDD TDD
Slide 17
Slide 17 text
Meet ATDD
User Story
Acceptance
Criteria
Spec By
Example
What to
test?
What are the
test cases?
Pain Points of TDD Simplified ATDD Process
Slide 18
Slide 18 text
SECTION 03
User Story + Spec By Example
ATDD
如何溝通需求?
User Story
Acceptance
Criteria
Spec By
Example
Slide 19
Slide 19 text
User Story User Story
Acceptance
Criteria
Spec By
Example
Slide 20
Slide 20 text
User Story User Story
Acceptance
Criteria
Spec By
Example
As a __, I want to __, so that __.
Slide 21
Slide 21 text
User Story User Story
Acceptance
Criteria
Spec By
Example
房屋篩選
As a __, I want to __, so that __.
Slide 22
Slide 22 text
User Story
As a __, I want to __, so that __.
As a ⼀名租屋族
User Story
Acceptance
Criteria
Spec By
Example
I want to 篩選符合理想條件的房⼦
so that 快速找到符合我預算和需求的租房選擇,減少尋找房源的時間和精⼒
Slide 23
Slide 23 text
Spec By Example User Story
Acceptance
Criteria
Spec By
Example
I want to 篩選符合理想條件的房⼦
什麼是理想條件?
⽤例⼦進⾏溝通
Slide 24
Slide 24 text
Spec By Example User Story
Acceptance
Criteria
Spec By
Example
I want to 篩選符合理想條件的房⼦
什麼是理想條件?
租⾦、地區、交通
⽤例⼦進⾏溝通
Slide 25
Slide 25 text
Spec By Example User Story
Acceptance
Criteria
Spec By
Example
租⾦、地區、交通
租⾦的範圍是多少?可以舉例嗎?
⽤例⼦進⾏溝通
Slide 26
Slide 26 text
Spec By Example User Story
Acceptance
Criteria
Spec By
Example
租⾦的範圍是多少?可以舉例嗎?
⽤例⼦進⾏溝通
租⾦、地區、交通
有效輸入:$0 ~ $999,999,999
無效輸入:< $0, > $999,999,999
邊緣輸入:$0, $999,999,999
Slide 27
Slide 27 text
SECTION 04
驗收標準 Acceptance Criteria
ATDD
如何檢驗需求有被達成?
User Story
Acceptance
Criteria
Spec By
Example
Slide 28
Slide 28 text
I want to 篩選
符合理想條件的房⼦
租⾦條件
…
…
驗收標準 Acceptance Criteria
User Story
Acceptance
Criteria
Spec By
Example
有效輸入:$0 ~ $999,999,999
無效輸入:< $0, > $999,999,999
邊緣輸入:$0, $999,999,999
User Story
實例化需求
Slide 29
Slide 29 text
I want to 篩選
符合理想條件的房⼦
租⾦條件
…
…
驗收標準 Acceptance Criteria
User Story
Acceptance
Criteria
Spec By
Example
有效輸入:$0 ~ $999,999,999
無效輸入:< $0, > $999,999,999
邊緣輸入:$0, $999,999,999
AC 001: 系統應根據使⽤者指定的預算範圍顯⽰房源列表
User Story
實例化需求
Slide 30
Slide 30 text
租⾦條件
驗收標準 Acceptance Criteria
User Story
Acceptance
Criteria
Spec By
Example
有效輸入:$0 ~ $999,999,999
Given
系統應根據使⽤者指定的預算範圍顯⽰房源列表
Slide 31
Slide 31 text
租⾦條件
驗收標準 Acceptance Criteria
User Story
Acceptance
Criteria
Spec By
Example
有效輸入:$0 ~ $999,999,999
Given
When 使⽤者查詢資料
系統應根據使⽤者指定的預算範圍顯⽰房源列表
Slide 32
Slide 32 text
租⾦條件
驗收標準 Acceptance Criteria
User Story
Acceptance
Criteria
Spec By
Example
有效輸入:$0 ~ $999,999,999
Given
When 使⽤者查詢資料
Then 預期得到房屋列表
系統應根據使⽤者指定的預算範圍顯⽰房源列表
Slide 33
Slide 33 text
租⾦條件
驗收標準 Acceptance Criteria
User Story
Acceptance
Criteria
Spec By
Example
有效輸入:$0 ~ $999,999,999
無效輸入:< $0, > $999,999,999
邊緣輸入:$0, $999,999,999
Given
When 使⽤者查詢資料
Then 預期得到房屋列表
系統應根據使⽤者指定的預算範圍顯⽰房源列表
Slide 34
Slide 34 text
租⾦條件
驗收標準 Acceptance Criteria
User Story
Acceptance
Criteria
Spec By
Example
有效輸入:$0 ~ $999,999,999
無效輸入:< $0, > $999,999,999
邊緣輸入:$0, $999,999,999
Given
When 使⽤者查詢資料
Then 錯誤處理
系統應根據使⽤者指定的預算範圍顯⽰房源列表
Slide 35
Slide 35 text
租⾦條件
驗收標準 Acceptance Criteria
User Story
Acceptance
Criteria
Spec By
Example
有效輸入:$0 ~ $999,999,999
無效輸入:< $0, > $999,999,999
邊緣輸入:$0, $999,999,999
Given
When 使⽤者查詢資料
Then [房屋列表] or [錯誤處理]
系統應根據使⽤者指定的預算範圍顯⽰房源列表
Slide 36
Slide 36 text
SECTION 05
來帶點東⻄回家吧
Summary
User Story
Acceptance
Criteria
Spec By
Example
Slide 37
Slide 37 text
Meet ATDD
User Story
Acceptance
Criteria
Spec By
Example
Pain Points of TDD Simplified ATDD Process
What to
test?
What are the
test cases?
Slide 38
Slide 38 text
Meet ATDD
Spec By
Example
User Story As a __, I want to __, so that __.
Slide 39
Slide 39 text
Meet ATDD
A
C
1
A
C
2
A
C
*
N
Spec By Example
User Story
⽤例⼦進⾏溝通
Slide 40
Slide 40 text
Meet ATDD
User Story
AC 1 AC 2 AC *N
Spec By Example
訂立驗收標準
Slide 41
Slide 41 text
Meet ATDD
User Story
AC 1 AC 2 AC *N
Spec By Example
TDD TDD TDD