6. Copyright@2012-2017 Teddysoft
SBE ATDD BDDTDD
2002
2002/
2004 2003/
2009
2009 20142009 20122011
Gojko Adzic
Kent Beck Dan North
2003
Eric
Evans
2002 2007
SBE vs. DBC
7.
8. Copyright@2012-2017 Teddysoft
Write a failing
unit test
Make the
test pass
Refactor
(Classic)
TDD
Write a failing
acceptance
test
(Modern)
TDD = BDD = SBE = ATDD
1 2
3
0
(Classic)
BDD/ATDD/SBE
26. Copyright@2012-2017 Teddysoft
Specification Example
1. Deriving scope from goals
2. Specifying collaboratively
3. Illustrating using examples
4. Refining the specification
5. Automating validating without
changing specifications
6. Validating frequently
7. Evolving a documentation system
《SBE》
Goal
1
2
3
4
AT automation
(executable
specification)
5 6
Living Doc
7
27. • 價值來自於
– 產品做對: Do the right thing (what)
– 品質做好: Do the thing right (how)
• SBE可協助交付價值
– 套用在需求面 (business facing)
• Define specifications for requirements (do the right thing)
– 套用在實作面 (technology facing)
• Define specifications for implementation (do the thing right)
Copyright@2012-2017 Teddysoft
28.
29.
30. Copyright@2017 Teddysoft
Write a failing
unit test
Make the
test pass
Refactor
(Classic)
TDD
Write a failing
acceptance
test
1 2
3
0
《BDD in Action》
44. Copyright@2012-2017 Teddysoft
Feature: Issuing invoices for companies
In order to avoid errors
As a Teddysoft employee
I want to brainlessly issue an company invoice with tax included price
Scenario: Issuing invoices with one item for companies by providing
tax included prices
Given The VAT rate is 0.05
And the tax included price is 17000
When I issue a company invoice
Then I should see the VAT is 810
And the tax excluded price is 16190
66. • BDD is a
– second-generation
– outside-in
– pull-based
– multiple-stakeholder
– multiple-scale
– high-automation
• agile methodology.
Copyright@2012-2017 Teddysoft
Dan North
67. • Explore examples through collaboration
– Do the right thing and do the thing right
– 沒有合作(僅由Stakeholders/PO提供)的user
story實際上是一種設計,並非需求
• Create living documentation
– 讓軟體變軟
Copyright@2012-2017 Teddysoft
Gojko Adzic