SlideShare une entreprise Scribd logo
1  sur  181
Télécharger pour lire hors ligne
•
•
•
    •
    •
    •
• http://seshop.com/event/dev/2007/
http://groups.yahoo.com/group/extremeprogramming/message/113518
Clean code that works, in
Ron Jeffries’ pithy phrase,
is the goal of Test-Driven
   Development(TDD).
“Clean code that works”
,-*


                               ed




                                                                   Refactor
                             R


   +*
                          Green

                    (#%&')!()*                          !quot;#$
Seasar Conference
                                                                                                     15
     2006 Autumn                 © The Seasar Foundation and the others 2006. all rights reserved.
“The translation of a
  feeling into a test is a
common theme of TDD.”
,-*


                               ed




                                                                   Refactor
                             R


   +*
                          Green

                    (#%&')!()*                          !quot;#$
Seasar Conference
                                                                                                     15
     2006 Autumn                 © The Seasar Foundation and the others 2006. all rights reserved.
http://tech.groups.yahoo.com/group/extremeprogramming/message/113575
•

•

•
•
•
•
•
2006:
a testing odyssey
1971
1992
http://www.biwa.ne.jp/~mmura/SoftwareDevelopment/WhatIsSoftwareDesignJ.html
1998
http://www.objectclub.jp/community/XP-jp/xp_relate/testinfected-j
1999
2000
WEB+DB PRESS Vol.35   t-wada
2002
2003
2004
•   http://blogs.itmedia.co.jp/hiranabe/2005/10/
    tdd__bdd__731d.html
2005
http://giantech.jp/wiki/BDDIntro
class EmptyMovieList < Spec::Context
  def setup
    @list = MovieList.new
  end

  def should_have_size_of_0
    @list.size.should_equal 0
  end

  def should_not_include_star_wars
    @list.should_not_include quot;Star Warsquot;
  end
end

class OneMovieList < Spec::Context
  def setup
    ...
  def should_have_size_of_1
    ...
end
2006
http://www.dannorth.net/introducing-bdd
http://behaviour-driven.org/
http://behaviour-driven.org/
25
Sapir–Whorf hypothesis
calc_spec.rb:
context quot;1+1             quot; do
  setup do
    @sum = 1 + 1
  end

  specify quot;          2           quot; do
    @sum.should_eql 2
  end
                 expectation
end

context quot;       quot; do
  specify quot;2-0   0              quot; do
    (2 - 0).should_eql 0
  end
end
rspec.rubyforge.org
context “5        ” do
  setup do
    @five_dollar = Money.doller(5)
  end

  specify “2        10              ” do
    (@five_doller * 2).should_eql Money.doller(10)
  end

  specify “5                ” do
    @five_doller.should_not_eql 5
  end

  ...
end

...
•

•

•

•
Smalltalk
Do you have any questions?

Contenu connexe

Similaire à D Is For Driven

S is For Spec at RubyKansai25
S is For Spec at RubyKansai25S is For Spec at RubyKansai25
S is For Spec at RubyKansai25Shintaro Kakutani
 
Cより速いRubyプログラム
Cより速いRubyプログラムCより速いRubyプログラム
Cより速いRubyプログラムkwatch
 
Perl University: Getting Started with Perl
Perl University: Getting Started with PerlPerl University: Getting Started with Perl
Perl University: Getting Started with Perlbrian d foy
 
421 Ch
421 Ch421 Ch
421 Chanjaan
 
PhpSpec TDD 紅燈-綠燈-重構流程-PHP也有day#25_by_閃亮亮
PhpSpec TDD 紅燈-綠燈-重構流程-PHP也有day#25_by_閃亮亮PhpSpec TDD 紅燈-綠燈-重構流程-PHP也有day#25_by_閃亮亮
PhpSpec TDD 紅燈-綠燈-重構流程-PHP也有day#25_by_閃亮亮亮亮 閃
 
R57php 1231677414471772-2
R57php 1231677414471772-2R57php 1231677414471772-2
R57php 1231677414471772-2ady36
 
テストを書いてGradleプラグインの開発効率を改善しよう
テストを書いてGradleプラグインの開発効率を改善しようテストを書いてGradleプラグインの開発効率を改善しよう
テストを書いてGradleプラグインの開発効率を改善しようShunsuke Maeda
 
JaanSi Solutions & Services profile (v1.0)
JaanSi Solutions & Services profile (v1.0)JaanSi Solutions & Services profile (v1.0)
JaanSi Solutions & Services profile (v1.0)Siddhartha Shankar
 
Танки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Танки_в_Лунапарке: нагрузочное_тестирование_в_ЯндексеТанки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Танки_в_Лунапарке: нагрузочное_тестирование_в_ЯндексеYandex
 
Zend Framework Study@Tokyo Vol1
Zend Framework Study@Tokyo Vol1Zend Framework Study@Tokyo Vol1
Zend Framework Study@Tokyo Vol1Shinya Ohyanagi
 
Zend Framework Study@Tokyo vol1
Zend Framework Study@Tokyo vol1Zend Framework Study@Tokyo vol1
Zend Framework Study@Tokyo vol1Shinya Ohyanagi
 
글로벌 CDN과 동적 웹 가속 기술 (Global CDN & Dynamic Web Acceleration) - FNet Grand Conf...
글로벌 CDN과 동적 웹 가속 기술 (Global CDN & Dynamic Web Acceleration) - FNet Grand Conf...글로벌 CDN과 동적 웹 가속 기술 (Global CDN & Dynamic Web Acceleration) - FNet Grand Conf...
글로벌 CDN과 동적 웹 가속 기술 (Global CDN & Dynamic Web Acceleration) - FNet Grand Conf...Junho Choi
 
Developing Desktop Applications using HTML and Javascript
Developing Desktop Applications using HTML and JavascriptDeveloping Desktop Applications using HTML and Javascript
Developing Desktop Applications using HTML and JavascriptJeff Haynie
 
JDD2015: Forgetting Java: Why Java Should Die in Flames and Take its Develope...
JDD2015: Forgetting Java: Why Java Should Die in Flames and Take its Develope...JDD2015: Forgetting Java: Why Java Should Die in Flames and Take its Develope...
JDD2015: Forgetting Java: Why Java Should Die in Flames and Take its Develope...PROIDEA
 
Practical Domain-Specific Languages in Groovy
Practical Domain-Specific Languages in GroovyPractical Domain-Specific Languages in Groovy
Practical Domain-Specific Languages in GroovyGuillaume Laforge
 
Business Origami - UX Week 2011 Workshop
Business Origami - UX Week 2011 WorkshopBusiness Origami - UX Week 2011 Workshop
Business Origami - UX Week 2011 WorkshopJess McMullin
 
Tips And Tricks For Bioinformatics Software Engineering
Tips And Tricks For Bioinformatics Software EngineeringTips And Tricks For Bioinformatics Software Engineering
Tips And Tricks For Bioinformatics Software Engineeringjtdudley
 
Microsoft NERD Talk - R and Tableau - 2-4-2013
Microsoft NERD Talk - R and Tableau - 2-4-2013Microsoft NERD Talk - R and Tableau - 2-4-2013
Microsoft NERD Talk - R and Tableau - 2-4-2013Tanya Cashorali
 

Similaire à D Is For Driven (20)

S is For Spec at RubyKansai25
S is For Spec at RubyKansai25S is For Spec at RubyKansai25
S is For Spec at RubyKansai25
 
S is for Spec
S is for SpecS is for Spec
S is for Spec
 
Cより速いRubyプログラム
Cより速いRubyプログラムCより速いRubyプログラム
Cより速いRubyプログラム
 
Perl University: Getting Started with Perl
Perl University: Getting Started with PerlPerl University: Getting Started with Perl
Perl University: Getting Started with Perl
 
421 Ch
421 Ch421 Ch
421 Ch
 
PhpSpec TDD 紅燈-綠燈-重構流程-PHP也有day#25_by_閃亮亮
PhpSpec TDD 紅燈-綠燈-重構流程-PHP也有day#25_by_閃亮亮PhpSpec TDD 紅燈-綠燈-重構流程-PHP也有day#25_by_閃亮亮
PhpSpec TDD 紅燈-綠燈-重構流程-PHP也有day#25_by_閃亮亮
 
Practical Groovy DSL
Practical Groovy DSLPractical Groovy DSL
Practical Groovy DSL
 
R57php 1231677414471772-2
R57php 1231677414471772-2R57php 1231677414471772-2
R57php 1231677414471772-2
 
テストを書いてGradleプラグインの開発効率を改善しよう
テストを書いてGradleプラグインの開発効率を改善しようテストを書いてGradleプラグインの開発効率を改善しよう
テストを書いてGradleプラグインの開発効率を改善しよう
 
JaanSi Solutions & Services profile (v1.0)
JaanSi Solutions & Services profile (v1.0)JaanSi Solutions & Services profile (v1.0)
JaanSi Solutions & Services profile (v1.0)
 
Танки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Танки_в_Лунапарке: нагрузочное_тестирование_в_ЯндексеТанки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Танки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
 
Zend Framework Study@Tokyo Vol1
Zend Framework Study@Tokyo Vol1Zend Framework Study@Tokyo Vol1
Zend Framework Study@Tokyo Vol1
 
Zend Framework Study@Tokyo vol1
Zend Framework Study@Tokyo vol1Zend Framework Study@Tokyo vol1
Zend Framework Study@Tokyo vol1
 
글로벌 CDN과 동적 웹 가속 기술 (Global CDN & Dynamic Web Acceleration) - FNet Grand Conf...
글로벌 CDN과 동적 웹 가속 기술 (Global CDN & Dynamic Web Acceleration) - FNet Grand Conf...글로벌 CDN과 동적 웹 가속 기술 (Global CDN & Dynamic Web Acceleration) - FNet Grand Conf...
글로벌 CDN과 동적 웹 가속 기술 (Global CDN & Dynamic Web Acceleration) - FNet Grand Conf...
 
Developing Desktop Applications using HTML and Javascript
Developing Desktop Applications using HTML and JavascriptDeveloping Desktop Applications using HTML and Javascript
Developing Desktop Applications using HTML and Javascript
 
JDD2015: Forgetting Java: Why Java Should Die in Flames and Take its Develope...
JDD2015: Forgetting Java: Why Java Should Die in Flames and Take its Develope...JDD2015: Forgetting Java: Why Java Should Die in Flames and Take its Develope...
JDD2015: Forgetting Java: Why Java Should Die in Flames and Take its Develope...
 
Practical Domain-Specific Languages in Groovy
Practical Domain-Specific Languages in GroovyPractical Domain-Specific Languages in Groovy
Practical Domain-Specific Languages in Groovy
 
Business Origami - UX Week 2011 Workshop
Business Origami - UX Week 2011 WorkshopBusiness Origami - UX Week 2011 Workshop
Business Origami - UX Week 2011 Workshop
 
Tips And Tricks For Bioinformatics Software Engineering
Tips And Tricks For Bioinformatics Software EngineeringTips And Tricks For Bioinformatics Software Engineering
Tips And Tricks For Bioinformatics Software Engineering
 
Microsoft NERD Talk - R and Tableau - 2-4-2013
Microsoft NERD Talk - R and Tableau - 2-4-2013Microsoft NERD Talk - R and Tableau - 2-4-2013
Microsoft NERD Talk - R and Tableau - 2-4-2013
 

Plus de Shintaro Kakutani

Postface from agilesamurai_supervisor
Postface from agilesamurai_supervisorPostface from agilesamurai_supervisor
Postface from agilesamurai_supervisorShintaro Kakutani
 
OedoRubyKaigi01 Opening Talk
OedoRubyKaigi01 Opening TalkOedoRubyKaigi01 Opening Talk
OedoRubyKaigi01 Opening TalkShintaro Kakutani
 
Testing Environment of Ruby on Rails
Testing Environment of Ruby on RailsTesting Environment of Ruby on Rails
Testing Environment of Ruby on RailsShintaro Kakutani
 
Agile Estimating and Planning on JFPUG
Agile Estimating and Planning on JFPUGAgile Estimating and Planning on JFPUG
Agile Estimating and Planning on JFPUGShintaro Kakutani
 
There Is No Spoon: Revisited
There Is No Spoon: RevisitedThere Is No Spoon: Revisited
There Is No Spoon: RevisitedShintaro Kakutani
 
"Ordinary" System Development
"Ordinary" System Development"Ordinary" System Development
"Ordinary" System DevelopmentShintaro Kakutani
 
what does "we speak Ruby" really mean?
what does "we speak Ruby" really mean?what does "we speak Ruby" really mean?
what does "we speak Ruby" really mean?Shintaro Kakutani
 
Agile Estimating and Planning
Agile Estimating and PlanningAgile Estimating and Planning
Agile Estimating and PlanningShintaro Kakutani
 
All About Nihon Ruby-no-Kai in Developers Summit 2010
All About Nihon Ruby-no-Kai in Developers Summit 2010All About Nihon Ruby-no-Kai in Developers Summit 2010
All About Nihon Ruby-no-Kai in Developers Summit 2010Shintaro Kakutani
 
For Nature Of Software Develoment
For Nature Of Software DevelomentFor Nature Of Software Develoment
For Nature Of Software DevelomentShintaro Kakutani
 
Welcome To The Desert Of The Real
Welcome To The Desert Of The RealWelcome To The Desert Of The Real
Welcome To The Desert Of The RealShintaro Kakutani
 
You Should Attend Rubykaigi2010
You Should Attend Rubykaigi2010You Should Attend Rubykaigi2010
You Should Attend Rubykaigi2010Shintaro Kakutani
 
Making Software Development Agile With Ruby
Making Software Development Agile With RubyMaking Software Development Agile With Ruby
Making Software Development Agile With RubyShintaro Kakutani
 
All about Nihon Ruby-no-kai Season6(TochigiRubyKaigi02 Edit)
All about Nihon Ruby-no-kai Season6(TochigiRubyKaigi02 Edit)All about Nihon Ruby-no-kai Season6(TochigiRubyKaigi02 Edit)
All about Nihon Ruby-no-kai Season6(TochigiRubyKaigi02 Edit)Shintaro Kakutani
 
All about Nihon Ruby-no-kai:Season6 (NagoyaRubyKaigi01 Edit.)
All about Nihon Ruby-no-kai:Season6 (NagoyaRubyKaigi01 Edit.)All about Nihon Ruby-no-kai:Season6 (NagoyaRubyKaigi01 Edit.)
All about Nihon Ruby-no-kai:Season6 (NagoyaRubyKaigi01 Edit.)Shintaro Kakutani
 

Plus de Shintaro Kakutani (20)

Postface from agilesamurai_supervisor
Postface from agilesamurai_supervisorPostface from agilesamurai_supervisor
Postface from agilesamurai_supervisor
 
Welcome to the Real World
Welcome to the Real WorldWelcome to the Real World
Welcome to the Real World
 
The gate
The gateThe gate
The gate
 
OedoRubyKaigi01 Opening Talk
OedoRubyKaigi01 Opening TalkOedoRubyKaigi01 Opening Talk
OedoRubyKaigi01 Opening Talk
 
Testing Environment of Ruby on Rails
Testing Environment of Ruby on RailsTesting Environment of Ruby on Rails
Testing Environment of Ruby on Rails
 
Agile Estimating and Planning on JFPUG
Agile Estimating and Planning on JFPUGAgile Estimating and Planning on JFPUG
Agile Estimating and Planning on JFPUG
 
There Is No Spoon: Revisited
There Is No Spoon: RevisitedThere Is No Spoon: Revisited
There Is No Spoon: Revisited
 
Agile in 30mins
Agile in 30minsAgile in 30mins
Agile in 30mins
 
"Ordinary" System Development
"Ordinary" System Development"Ordinary" System Development
"Ordinary" System Development
 
There is no_spoon
There is no_spoonThere is no_spoon
There is no_spoon
 
Keccon LT by kakutani
Keccon LT by kakutaniKeccon LT by kakutani
Keccon LT by kakutani
 
what does "we speak Ruby" really mean?
what does "we speak Ruby" really mean?what does "we speak Ruby" really mean?
what does "we speak Ruby" really mean?
 
Agile Estimating and Planning
Agile Estimating and PlanningAgile Estimating and Planning
Agile Estimating and Planning
 
All About Nihon Ruby-no-Kai in Developers Summit 2010
All About Nihon Ruby-no-Kai in Developers Summit 2010All About Nihon Ruby-no-Kai in Developers Summit 2010
All About Nihon Ruby-no-Kai in Developers Summit 2010
 
For Nature Of Software Develoment
For Nature Of Software DevelomentFor Nature Of Software Develoment
For Nature Of Software Develoment
 
Welcome To The Desert Of The Real
Welcome To The Desert Of The RealWelcome To The Desert Of The Real
Welcome To The Desert Of The Real
 
You Should Attend Rubykaigi2010
You Should Attend Rubykaigi2010You Should Attend Rubykaigi2010
You Should Attend Rubykaigi2010
 
Making Software Development Agile With Ruby
Making Software Development Agile With RubyMaking Software Development Agile With Ruby
Making Software Development Agile With Ruby
 
All about Nihon Ruby-no-kai Season6(TochigiRubyKaigi02 Edit)
All about Nihon Ruby-no-kai Season6(TochigiRubyKaigi02 Edit)All about Nihon Ruby-no-kai Season6(TochigiRubyKaigi02 Edit)
All about Nihon Ruby-no-kai Season6(TochigiRubyKaigi02 Edit)
 
All about Nihon Ruby-no-kai:Season6 (NagoyaRubyKaigi01 Edit.)
All about Nihon Ruby-no-kai:Season6 (NagoyaRubyKaigi01 Edit.)All about Nihon Ruby-no-kai:Season6 (NagoyaRubyKaigi01 Edit.)
All about Nihon Ruby-no-kai:Season6 (NagoyaRubyKaigi01 Edit.)
 

D Is For Driven