6. Do you know?
Software Bugs Cost U.S. Economy
$312 Billion
Annually
6
Source:http://insight.jbs.cam.ac.uk/2013/financial-content-cambridge-university-study-states-software-bugs-cost-economy-312-billion-per-year
18. Development Flow
Requirement
Analysis
UI Mocking
Customer
discussion
Design Draft
Design
Discussion
Code the
skeleton to
test the
design
Coding in
team
Refactoring
and
Refinement
Build the
increment
$
DevTeamPO
Collaboration:
Steps:
Artifacts:
As a super user,
I want to
A
B
IDo
Interface IDo{
//TODO
}
Class A{
//TODO
}
Class B:IDo{
//TODO
}
Interface IDo{
//TODO
}
Class A{
method1(){
//Mr. A codes here
}
}
Class B:IDo{
method1(){
//Mrs. B codes here
}
}
Class C{
}
$
PO
34. Test First v TDD
Test First l m畛t c叩ch ti畉p c畉n m畛i so v畛i m担 h狸nh ph叩t tri畛n
ph畉n m畛m truy畛n th畛ng, trong 坦 vi畛c l畉p tr狸nh b畉t 畉u b畉ng
c叩ch vi畉t c叩c bi ki畛m th畛 tr動畛c khi b畉t tay vo vi畉t m達 ngu畛n
c畛a ch動董ng tr狸nh
TDD (Test Driven Development) l m畛t quy tr狸nh l畉p tr狸nh, trong
坦 bao g畛m nhi畛u giai o畉n nh畛 l畉p i l畉p l畉i, m畛i giai o畉n bao
g畛m c叩c b動畛c:
Vi畉t c叩c bi ki畛m th畛
Vi畉t m達 ngu畛n
T叩i c畉u tr炭c m達 ngu畛n.
35. V嘆ng th畛c thi c畛a TDD
Vi畉t Test
Fail b畛i v狸 ch動a c坦 m達 ngu畛n
Th担ng th動畛ng c叩c IDE s畉 b叩o message mu
畛
Vi畉t m達 ngu畛n
Vi畉t m達 ngu畛n 畛 v動畛t qua test
Th担ng th動畛ng c叩c IDE s畉 b叩o message mu
xanh
T叩i c畉u tr炭c m達 ngu畛n
Ch畛nh s畛a m達 ngu畛n 畛 t畛t h董n
C畉n 畉m b畉o m達 ngu畛n v畉n v動畛t qua 動畛c
c叩c bi test
1. FAIL
2. PASS
3.
REFACTOR
37. Ph但n lo畉i tam gi叩c
Gi叩 tr畛 c畛a
c畉nh a
Gi叩 tr畛 c畛a
c畉nh b
Gi叩 tr畛 c畛a
c畉nh c
Lo畉i tam gi叩c
2 2 2 tam gi叩c 畛u
2 2 3 tam gi叩c c但n
3 4 5 tam gi叩c th動畛ng
8 2 3 kh担ng ph畉i l tam gi叩c