SlideShare une entreprise Scribd logo
1  sur  30
Télécharger pour lire hors ligne
Oxente, ramo falar de BDD
 macho, depois rebola no
  mato esse codigo réi!
           Não cuideis que vim trazer a paz à terra;
           não vim trazer paz, mas pexeira;
           http://www.bibliaonline.com.br/acf/mt/10
Traditional Software Life Cycle


                   Software Life Cycle

     Development     Maintenance




  First Deploy - Transition
Traditional Iterations
Process Disciplines             Inception Elaboration            Construction          Transition

           Business Modeling
                Requirements
            Analysis & Design
               Implementation
                         Test
                  Deployment
                                Preliminary     Iter.   Iter.   Iter.    Iter. Iter.   Iter.    Iter.
                                Iteration(s)‫‏‬    #1     #2      #n      #n+1 #n+2      #m      #m+1

                                                            Iterations



   Business Requirements Analysis    Design Implementation Test Deployment
Too Late Feedback
Process Disciplines             Inception Elaboration            Construction          Transition

           Business Modeling
                Requirements
            Analysis & Design
               Implementation
                         Test
                  Deployment
                                Preliminary     Iter.   Iter.   Iter.    Iter. Iter.   Iter.    Iter.
                                Iteration(s)‫‏‬    #1     #2      #n      #n+1 #n+2      #m      #m+1

                                                            Iterations



   Business Requirements Analysis    Design Implementation Test Deployment

       failure when changes happen or feature misunderstood
Laggards Tests
Process Disciplines             Inception Elaboration            Construction          Transition

           Business Modeling
                Requirements
            Analysis & Design
               Implementation
                         Test
                  Deployment
                                Preliminary     Iter.   Iter.   Iter.    Iter. Iter.   Iter.    Iter.
                                Iteration(s)‫‏‬    #1     #2      #n      #n+1 #n+2      #m      #m+1

                                                            Iterations



   Business Requirements Analysis    Design Implementation Test Deployment


                 Fragile coverage and poor code
                 with low Cohesion and high Coupling
Migrating to Agile Iteration

 Process Disciplines            Inception Elaboration            Construction          Transition

           Business Modeling
                Requirements
            Analysis & Design
              Implementation
                        Test
                 Deployment
                                Preliminary     Iter.   Iter.   Iter.    Iter. Iter.   Iter.    Iter.
                                Iteration(s)‫‏‬   #1      #2      #n      #n+1 #n+2      #m      #m+1

                                                            Iterations
Not Enough Time

 Process Disciplines            Inception Elaboration            Construction          Transition

           Business Modeling
                Requirements
            Analysis & Design
              Implementation
                        Test
                 Deployment
                                Preliminary     Iter.   Iter.   Iter.    Iter. Iter.   Iter.    Iter.
                                Iteration(s)‫‏‬   #1      #2      #n      #n+1 #n+2      #m      #m+1

                                                            Iterations



                  Tests are traditionally discarded
                  when not enough time
Test First Practice

 Process Disciplines            Inception Elaboration            Construction          Transition

                       Test
           Business Modeling
                Requirements
            Analysis & Design
              Implementation
                 Deployment
                                Preliminary     Iter.   Iter.   Iter.    Iter. Iter.   Iter.    Iter.
                                Iteration(s)‫‏‬   #1      #2      #n      #n+1 #n+2      #m      #m+1

                                                            Iterations



                Test First modifies the traditional
                approach to modeling and analysis
Test Driven Development



      "Test-driven development is a way of
      managing fear during programming."

                         Kent Beck - Test Driven
                         Development by Example
Daily Development
  Standup Meeting          Pair Up


   TDD Cycle

                    Test



             Code          Refactoring




        Integrate
Red Bar Patterns
One Step Test
Starter Test       Testing Bar Patterns
Explanation Test       Child Test
Learning Test          Mock Object
Another Test           Self Shunt
Regression Test        Crash Test Dummy
Break                  Broken Test
Do Over                Clean Check-Inc

     Test Double
          Dummy     Green Bar Patterns
          Fake       Fake It (Till you make it)‫‏‬
          Stubs      Triangulate
          Spies      Obvious Implementation
          Mocks      One to Many
The Three A's in TDD


        Arrange (create an object)‫‏‬
        Act     (executing a method)‫‏‬
        Assert (verifying a result)‫‏‬


               Refactoring Workbook, Bill Wake
Arrange




var object = Object.create({test:10});
Act




   var object = Object.create({test:10});
var verified = object.trying("test");
Assert




   var object = Object.create({test:10});
var verified = object.trying("test");

ok( verified == 10 );
3A



var object = Object.create({test:10});
var verified = object.trying("test");
ok( verified == 10 );
XUnit


test("Trying contents of a property
without throwing exception", function()
{
  var object = Object.create({test:10})
  ok( object.trying("test") == 10, "Cool" );
});
What You Are Doing



describe('jsonform',function(){




});
Establish The Context


describe('jsonform',function(){

      context('Populate form with json',function(){

      }

});
Specify The Behavior

describe('jsonform',function(){

      context('Populate form',function(){
        it('Json with object nested',function(){

          }
      }

});
Should
describe('jsonform',function(){
    context('Populate form',function(){
      it('Json with object nested',function(){
          jQuery('#jsonform').jsonform(object,
              function(json) {
                 expect(jQuery(query).val().toString())
                .toEqual("1.02.0002");
          });
      }
    }
});
Behaviour




BDD provides a “ubiquitous language” for analysis
                   Dan North
      http://dannorth.net/introducing-bdd/
Acceptance




   As a
  I want
  so that
Criteria




Given some initial context (the givens),
       When an event occurs,
    Then ensure some outcomes.
ATDD
feature('Using jQuery plugin to populate form', function() {
 summary(
    'In order to submit my form',
    'As a user',
    'I want populate a form with json'
 );
 scenario('The is stopped with the engine off', function() {
    var object;
    given('json object', function() {

         });
        and('form html', function() {

        });
        when('I press the start button', function() {

        });
        then('The expected ', function() {
          expect(expected).toEqual("expected");
        });
  });
});
ATDD
feature('Using jQuery plugin to populate form', function() {
  summary(
      'In order to submit my form',
      'As a user',
      'I want populate a form with json'
  );
  scenario('The is stopped with the engine off', function() {
      var object;
      given('json object', function() {
        object = {
            nested: {id: 2, name: "Teste"},
            array_nested: [
               {nested: {id: 3, name: "Teste"} }
            ],
            description: "Teste",
            value: "125,67",
            date: "12/03/1999"
          };
        });
      and('form html', function() {
        var template = "<form action='#' id='jsonform'> 
        ...
        </form>";
        jQuery(template).appendTo("body");
      });
      when('I press the start button', function() {
        jQuery('#jsonform').jsonform(object);
      });
      then('The car should start up', function() {
        expect(jQuery(query).val().toString()).toEqual("Teste");
      });
  });
});
Daily Development
  Standup Meeting                      Pair Up


   BDD/TDD Cycle       Acceptance                 Model
                          Test                   Storming


                           Test

                    Code      Refactoring
     Refactoring                             Code



        Integrate
BDD




TDD + DDD (+ATDD)
Transition Frontier Broken


                                                 Software Life Cycle

                  Development                           Maintenance
                  Desenvolvimento                       Manutenção

            Test              Test              Test
        Modeling          Modeling          Modeling
   Requirements      Requirements      Requirements
Analysis & Design Analysis & Design Analysis & Design
 Implementation    Implementation    Implementation
    Deployment        Deployment        Deployment




                             Transition frontier no longer makes sense
BDD macho falar codigo réi

Contenu connexe

Tendances

Real developers-dont-need-unit-tests
Real developers-dont-need-unit-testsReal developers-dont-need-unit-tests
Real developers-dont-need-unit-testsSkills Matter
 
Unit testingandcontinousintegrationfreenest1dot4
Unit testingandcontinousintegrationfreenest1dot4Unit testingandcontinousintegrationfreenest1dot4
Unit testingandcontinousintegrationfreenest1dot4JAMK
 
Complete testing@uma
Complete testing@umaComplete testing@uma
Complete testing@umaUma Sapireddy
 
Avatars of Test Driven Development (TDD)
Avatars of Test Driven Development (TDD)Avatars of Test Driven Development (TDD)
Avatars of Test Driven Development (TDD)Naresh Jain
 
SLC Process for Software Development & Quality Control
SLC Process for Software Development & Quality ControlSLC Process for Software Development & Quality Control
SLC Process for Software Development & Quality ControlMD ISLAM
 
Test design problems investigation taixiaomei 20120807
Test design problems investigation taixiaomei 20120807Test design problems investigation taixiaomei 20120807
Test design problems investigation taixiaomei 20120807drewz lin
 
Visual Studio 2010 Testing & Lab Management Tools
Visual Studio 2010 Testing & Lab Management ToolsVisual Studio 2010 Testing & Lab Management Tools
Visual Studio 2010 Testing & Lab Management ToolsAyman El-Hattab
 

Tendances (13)

Real developers-dont-need-unit-tests
Real developers-dont-need-unit-testsReal developers-dont-need-unit-tests
Real developers-dont-need-unit-tests
 
The Design Process - FRC
The Design Process - FRCThe Design Process - FRC
The Design Process - FRC
 
Unit testingandcontinousintegrationfreenest1dot4
Unit testingandcontinousintegrationfreenest1dot4Unit testingandcontinousintegrationfreenest1dot4
Unit testingandcontinousintegrationfreenest1dot4
 
QTP Online Training
QTP Online Training QTP Online Training
QTP Online Training
 
Complete testing@uma
Complete testing@umaComplete testing@uma
Complete testing@uma
 
Avatars of Test Driven Development (TDD)
Avatars of Test Driven Development (TDD)Avatars of Test Driven Development (TDD)
Avatars of Test Driven Development (TDD)
 
SLC Process for Software Development & Quality Control
SLC Process for Software Development & Quality ControlSLC Process for Software Development & Quality Control
SLC Process for Software Development & Quality Control
 
Istqb ctfl syll 2011
Istqb ctfl syll 2011Istqb ctfl syll 2011
Istqb ctfl syll 2011
 
Van heeringen metrics in rf ps
Van heeringen   metrics in rf psVan heeringen   metrics in rf ps
Van heeringen metrics in rf ps
 
TDD Overview
TDD OverviewTDD Overview
TDD Overview
 
Test design problems investigation taixiaomei 20120807
Test design problems investigation taixiaomei 20120807Test design problems investigation taixiaomei 20120807
Test design problems investigation taixiaomei 20120807
 
ICPC08b.ppt
ICPC08b.pptICPC08b.ppt
ICPC08b.ppt
 
Visual Studio 2010 Testing & Lab Management Tools
Visual Studio 2010 Testing & Lab Management ToolsVisual Studio 2010 Testing & Lab Management Tools
Visual Studio 2010 Testing & Lab Management Tools
 

En vedette

ComGen CPnet presentation
ComGen CPnet presentationComGen CPnet presentation
ComGen CPnet presentationpdewit
 
GERÊNCIA E COMPETÊNCIAS GERAIS DO ENFERMEIRO
GERÊNCIA E COMPETÊNCIAS GERAIS DO ENFERMEIROGERÊNCIA E COMPETÊNCIAS GERAIS DO ENFERMEIRO
GERÊNCIA E COMPETÊNCIAS GERAIS DO ENFERMEIROCarolina Franco
 
Venezuela vinheta grupo 5
Venezuela vinheta grupo 5Venezuela vinheta grupo 5
Venezuela vinheta grupo 5blog_setimaf
 
Aula V - segurança juridica e processo
Aula V -  segurança juridica e processoAula V -  segurança juridica e processo
Aula V - segurança juridica e processoHeitor Carvalho
 
Apres Institucional R&amp;B2008 2009 Ing
Apres Institucional R&amp;B2008 2009 IngApres Institucional R&amp;B2008 2009 Ing
Apres Institucional R&amp;B2008 2009 Ingademarc
 
www.aulaparticularonline.net.br - Química - Ligações Químicas
www.aulaparticularonline.net.br - Química -  Ligações Químicaswww.aulaparticularonline.net.br - Química -  Ligações Químicas
www.aulaparticularonline.net.br - Química - Ligações QuímicasLucia Silveira
 
Via credi info01(29062010)
Via credi info01(29062010)Via credi info01(29062010)
Via credi info01(29062010)Jorge Purgly
 
Lisa Pattyn - Student Entrepreneurship Program
Lisa Pattyn - Student Entrepreneurship ProgramLisa Pattyn - Student Entrepreneurship Program
Lisa Pattyn - Student Entrepreneurship Programimec.archive
 
Proman Higiene ¿Por que?
Proman Higiene ¿Por que?Proman Higiene ¿Por que?
Proman Higiene ¿Por que?inpresionante
 

En vedette (20)

ComGen CPnet presentation
ComGen CPnet presentationComGen CPnet presentation
ComGen CPnet presentation
 
Sondaterra sonda caladora
Sondaterra   sonda caladoraSondaterra   sonda caladora
Sondaterra sonda caladora
 
GERÊNCIA E COMPETÊNCIAS GERAIS DO ENFERMEIRO
GERÊNCIA E COMPETÊNCIAS GERAIS DO ENFERMEIROGERÊNCIA E COMPETÊNCIAS GERAIS DO ENFERMEIRO
GERÊNCIA E COMPETÊNCIAS GERAIS DO ENFERMEIRO
 
Venezuela vinheta grupo 5
Venezuela vinheta grupo 5Venezuela vinheta grupo 5
Venezuela vinheta grupo 5
 
Cesun Universidad
Cesun UniversidadCesun Universidad
Cesun Universidad
 
Machine toolindustry en
Machine toolindustry enMachine toolindustry en
Machine toolindustry en
 
Aula V - segurança juridica e processo
Aula V -  segurança juridica e processoAula V -  segurança juridica e processo
Aula V - segurança juridica e processo
 
Apres Institucional R&amp;B2008 2009 Ing
Apres Institucional R&amp;B2008 2009 IngApres Institucional R&amp;B2008 2009 Ing
Apres Institucional R&amp;B2008 2009 Ing
 
www.aulaparticularonline.net.br - Química - Ligações Químicas
www.aulaparticularonline.net.br - Química -  Ligações Químicaswww.aulaparticularonline.net.br - Química -  Ligações Químicas
www.aulaparticularonline.net.br - Química - Ligações Químicas
 
Via credi info01(29062010)
Via credi info01(29062010)Via credi info01(29062010)
Via credi info01(29062010)
 
COLETIVO COCA COLA - SIMOES
COLETIVO COCA COLA - SIMOESCOLETIVO COCA COLA - SIMOES
COLETIVO COCA COLA - SIMOES
 
O Fator VDM (promo)
O Fator VDM (promo)O Fator VDM (promo)
O Fator VDM (promo)
 
Direito
DireitoDireito
Direito
 
Internet
InternetInternet
Internet
 
Prodesc sistema
Prodesc sistemaProdesc sistema
Prodesc sistema
 
Curriculo Global Gystem
Curriculo Global GystemCurriculo Global Gystem
Curriculo Global Gystem
 
Lisa Pattyn - Student Entrepreneurship Program
Lisa Pattyn - Student Entrepreneurship ProgramLisa Pattyn - Student Entrepreneurship Program
Lisa Pattyn - Student Entrepreneurship Program
 
Proman Higiene ¿Por que?
Proman Higiene ¿Por que?Proman Higiene ¿Por que?
Proman Higiene ¿Por que?
 
Candidatos São Paulo
Candidatos São PauloCandidatos São Paulo
Candidatos São Paulo
 
Apresentação2
Apresentação2Apresentação2
Apresentação2
 

Similaire à BDD macho falar codigo réi

Agile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer PerspectiveAgile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer PerspectiveWee Witthawaskul
 
Tdd pecha kucha_v2
Tdd pecha kucha_v2Tdd pecha kucha_v2
Tdd pecha kucha_v2Paul Boos
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by ExampleNalin Goonawardana
 
Unit Testing like a Pro - The Circle of Purity
Unit Testing like a Pro - The Circle of PurityUnit Testing like a Pro - The Circle of Purity
Unit Testing like a Pro - The Circle of PurityVictor Rentea
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScriptJeremy Likness
 
關於測試,我說的其實是......
關於測試,我說的其實是......關於測試,我說的其實是......
關於測試,我說的其實是......hugo lu
 
Wintellect - Devscovery - Enterprise JavaScript Development 1 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 1 of 2Wintellect - Devscovery - Enterprise JavaScript Development 1 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 1 of 2Jeremy Likness
 
When develpment met test(shift left testing)
When develpment met test(shift left testing)When develpment met test(shift left testing)
When develpment met test(shift left testing)SangIn Choung
 
Testing Sap: Modern Methodology
Testing Sap: Modern MethodologyTesting Sap: Modern Methodology
Testing Sap: Modern MethodologyEthan Jewett
 
Agile Network India | Agile coding practices to deliver value
Agile Network India | Agile coding practices to deliver valueAgile Network India | Agile coding practices to deliver value
Agile Network India | Agile coding practices to deliver valueAgileNetwork
 
In search of JavaScript code quality: unit testing
In search of JavaScript code quality: unit testingIn search of JavaScript code quality: unit testing
In search of JavaScript code quality: unit testingAnna Khabibullina
 
Behaviour Driven Development and Thinking About Testing
Behaviour Driven Development and Thinking About TestingBehaviour Driven Development and Thinking About Testing
Behaviour Driven Development and Thinking About Testingdn
 
Bdd and-testing
Bdd and-testingBdd and-testing
Bdd and-testingmalcolmt
 
Test driven development in .Net - 2010 + Eclipse
Test driven development in .Net - 2010 + EclipseTest driven development in .Net - 2010 + Eclipse
Test driven development in .Net - 2010 + EclipseUTC Fire & Security
 
Test driven development v1.0
Test driven development v1.0Test driven development v1.0
Test driven development v1.0Ganesh Kondal
 
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Babul Mirdha
 

Similaire à BDD macho falar codigo réi (20)

Agile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer PerspectiveAgile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer Perspective
 
Tdd pecha kucha_v2
Tdd pecha kucha_v2Tdd pecha kucha_v2
Tdd pecha kucha_v2
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
Unit Testing like a Pro - The Circle of Purity
Unit Testing like a Pro - The Circle of PurityUnit Testing like a Pro - The Circle of Purity
Unit Testing like a Pro - The Circle of Purity
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
 
TDD & BDD
TDD & BDDTDD & BDD
TDD & BDD
 
關於測試,我說的其實是......
關於測試,我說的其實是......關於測試,我說的其實是......
關於測試,我說的其實是......
 
Wintellect - Devscovery - Enterprise JavaScript Development 1 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 1 of 2Wintellect - Devscovery - Enterprise JavaScript Development 1 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 1 of 2
 
When develpment met test(shift left testing)
When develpment met test(shift left testing)When develpment met test(shift left testing)
When develpment met test(shift left testing)
 
Testing Sap: Modern Methodology
Testing Sap: Modern MethodologyTesting Sap: Modern Methodology
Testing Sap: Modern Methodology
 
Agile Network India | Agile coding practices to deliver value
Agile Network India | Agile coding practices to deliver valueAgile Network India | Agile coding practices to deliver value
Agile Network India | Agile coding practices to deliver value
 
In search of JavaScript code quality: unit testing
In search of JavaScript code quality: unit testingIn search of JavaScript code quality: unit testing
In search of JavaScript code quality: unit testing
 
Behaviour Driven Development and Thinking About Testing
Behaviour Driven Development and Thinking About TestingBehaviour Driven Development and Thinking About Testing
Behaviour Driven Development and Thinking About Testing
 
Bdd and-testing
Bdd and-testingBdd and-testing
Bdd and-testing
 
Introduction to TDD and Mocking
Introduction to TDD and MockingIntroduction to TDD and Mocking
Introduction to TDD and Mocking
 
Test driven development in .Net - 2010 + Eclipse
Test driven development in .Net - 2010 + EclipseTest driven development in .Net - 2010 + Eclipse
Test driven development in .Net - 2010 + Eclipse
 
Test driven development v1.0
Test driven development v1.0Test driven development v1.0
Test driven development v1.0
 
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)
 
Tdd and-bdd
Tdd and-bddTdd and-bdd
Tdd and-bdd
 
Coding Naked
Coding NakedCoding Naked
Coding Naked
 

Plus de Milfont Consulting

Continuous integration e continuous delivery para salvar o seu projeto!
Continuous integration e continuous delivery para salvar o seu projeto!Continuous integration e continuous delivery para salvar o seu projeto!
Continuous integration e continuous delivery para salvar o seu projeto!Milfont Consulting
 
Equipes sem Líderes formais e realmente autogeridas
Equipes sem Líderes formais e realmente autogeridasEquipes sem Líderes formais e realmente autogeridas
Equipes sem Líderes formais e realmente autogeridasMilfont Consulting
 
Combinando OO e Funcional em javascript de forma prática
Combinando OO e Funcional em javascript de forma práticaCombinando OO e Funcional em javascript de forma prática
Combinando OO e Funcional em javascript de forma práticaMilfont Consulting
 
Engine de template em Javascript com HTML Sprites
Engine de template em Javascript com HTML SpritesEngine de template em Javascript com HTML Sprites
Engine de template em Javascript com HTML SpritesMilfont Consulting
 
I TDD my jQuery code without Browser
I TDD my jQuery code without BrowserI TDD my jQuery code without Browser
I TDD my jQuery code without BrowserMilfont Consulting
 
Construindo WebApps ricas com Rails e Sencha
Construindo WebApps ricas com Rails e SenchaConstruindo WebApps ricas com Rails e Sencha
Construindo WebApps ricas com Rails e SenchaMilfont Consulting
 
BDD com Cucumber, Selenium e Rails
BDD com Cucumber, Selenium e RailsBDD com Cucumber, Selenium e Rails
BDD com Cucumber, Selenium e RailsMilfont Consulting
 
Apresentando Extreme Programming
Apresentando Extreme ProgrammingApresentando Extreme Programming
Apresentando Extreme ProgrammingMilfont Consulting
 

Plus de Milfont Consulting (20)

Continuous integration e continuous delivery para salvar o seu projeto!
Continuous integration e continuous delivery para salvar o seu projeto!Continuous integration e continuous delivery para salvar o seu projeto!
Continuous integration e continuous delivery para salvar o seu projeto!
 
Equipes sem Líderes formais e realmente autogeridas
Equipes sem Líderes formais e realmente autogeridasEquipes sem Líderes formais e realmente autogeridas
Equipes sem Líderes formais e realmente autogeridas
 
Mvc sem Controller
Mvc sem ControllerMvc sem Controller
Mvc sem Controller
 
Beagajs
BeagajsBeagajs
Beagajs
 
Combinando OO e Funcional em javascript de forma prática
Combinando OO e Funcional em javascript de forma práticaCombinando OO e Funcional em javascript de forma prática
Combinando OO e Funcional em javascript de forma prática
 
Engine de template em Javascript com HTML Sprites
Engine de template em Javascript com HTML SpritesEngine de template em Javascript com HTML Sprites
Engine de template em Javascript com HTML Sprites
 
MVC Model 3
MVC Model 3MVC Model 3
MVC Model 3
 
Dar caos à ordem
Dar caos à ordemDar caos à ordem
Dar caos à ordem
 
I TDD my jQuery code without Browser
I TDD my jQuery code without BrowserI TDD my jQuery code without Browser
I TDD my jQuery code without Browser
 
Construindo WebApps ricas com Rails e Sencha
Construindo WebApps ricas com Rails e SenchaConstruindo WebApps ricas com Rails e Sencha
Construindo WebApps ricas com Rails e Sencha
 
Dar Ordem ao Caos
Dar Ordem ao CaosDar Ordem ao Caos
Dar Ordem ao Caos
 
Domain driven design
Domain driven designDomain driven design
Domain driven design
 
BDD com Cucumber, Selenium e Rails
BDD com Cucumber, Selenium e RailsBDD com Cucumber, Selenium e Rails
BDD com Cucumber, Selenium e Rails
 
Mare de Agilidade - BDD e TDD
Mare de Agilidade - BDD e TDDMare de Agilidade - BDD e TDD
Mare de Agilidade - BDD e TDD
 
Apresentando Extreme Programming
Apresentando Extreme ProgrammingApresentando Extreme Programming
Apresentando Extreme Programming
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven Development
 
Primeiro Dia Livre Opensocial
Primeiro Dia Livre OpensocialPrimeiro Dia Livre Opensocial
Primeiro Dia Livre Opensocial
 
Tw Dwr 2007 Ap01
Tw Dwr 2007 Ap01Tw Dwr 2007 Ap01
Tw Dwr 2007 Ap01
 
Course Hibernate 2008
Course Hibernate 2008Course Hibernate 2008
Course Hibernate 2008
 

Dernier

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Dernier (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

BDD macho falar codigo réi

  • 1. Oxente, ramo falar de BDD macho, depois rebola no mato esse codigo réi! Não cuideis que vim trazer a paz à terra; não vim trazer paz, mas pexeira; http://www.bibliaonline.com.br/acf/mt/10
  • 2. Traditional Software Life Cycle Software Life Cycle Development Maintenance First Deploy - Transition
  • 3. Traditional Iterations Process Disciplines Inception Elaboration Construction Transition Business Modeling Requirements Analysis & Design Implementation Test Deployment Preliminary Iter. Iter. Iter. Iter. Iter. Iter. Iter. Iteration(s)‫‏‬ #1 #2 #n #n+1 #n+2 #m #m+1 Iterations Business Requirements Analysis Design Implementation Test Deployment
  • 4. Too Late Feedback Process Disciplines Inception Elaboration Construction Transition Business Modeling Requirements Analysis & Design Implementation Test Deployment Preliminary Iter. Iter. Iter. Iter. Iter. Iter. Iter. Iteration(s)‫‏‬ #1 #2 #n #n+1 #n+2 #m #m+1 Iterations Business Requirements Analysis Design Implementation Test Deployment failure when changes happen or feature misunderstood
  • 5. Laggards Tests Process Disciplines Inception Elaboration Construction Transition Business Modeling Requirements Analysis & Design Implementation Test Deployment Preliminary Iter. Iter. Iter. Iter. Iter. Iter. Iter. Iteration(s)‫‏‬ #1 #2 #n #n+1 #n+2 #m #m+1 Iterations Business Requirements Analysis Design Implementation Test Deployment Fragile coverage and poor code with low Cohesion and high Coupling
  • 6. Migrating to Agile Iteration Process Disciplines Inception Elaboration Construction Transition Business Modeling Requirements Analysis & Design Implementation Test Deployment Preliminary Iter. Iter. Iter. Iter. Iter. Iter. Iter. Iteration(s)‫‏‬ #1 #2 #n #n+1 #n+2 #m #m+1 Iterations
  • 7. Not Enough Time Process Disciplines Inception Elaboration Construction Transition Business Modeling Requirements Analysis & Design Implementation Test Deployment Preliminary Iter. Iter. Iter. Iter. Iter. Iter. Iter. Iteration(s)‫‏‬ #1 #2 #n #n+1 #n+2 #m #m+1 Iterations Tests are traditionally discarded when not enough time
  • 8. Test First Practice Process Disciplines Inception Elaboration Construction Transition Test Business Modeling Requirements Analysis & Design Implementation Deployment Preliminary Iter. Iter. Iter. Iter. Iter. Iter. Iter. Iteration(s)‫‏‬ #1 #2 #n #n+1 #n+2 #m #m+1 Iterations Test First modifies the traditional approach to modeling and analysis
  • 9. Test Driven Development "Test-driven development is a way of managing fear during programming." Kent Beck - Test Driven Development by Example
  • 10. Daily Development Standup Meeting Pair Up TDD Cycle Test Code Refactoring Integrate
  • 11. Red Bar Patterns One Step Test Starter Test Testing Bar Patterns Explanation Test Child Test Learning Test Mock Object Another Test Self Shunt Regression Test Crash Test Dummy Break Broken Test Do Over Clean Check-Inc Test Double Dummy Green Bar Patterns Fake Fake It (Till you make it)‫‏‬ Stubs Triangulate Spies Obvious Implementation Mocks One to Many
  • 12. The Three A's in TDD Arrange (create an object)‫‏‬ Act (executing a method)‫‏‬ Assert (verifying a result)‫‏‬ Refactoring Workbook, Bill Wake
  • 13. Arrange var object = Object.create({test:10});
  • 14. Act var object = Object.create({test:10}); var verified = object.trying("test");
  • 15. Assert var object = Object.create({test:10}); var verified = object.trying("test"); ok( verified == 10 );
  • 16. 3A var object = Object.create({test:10}); var verified = object.trying("test"); ok( verified == 10 );
  • 17. XUnit test("Trying contents of a property without throwing exception", function() { var object = Object.create({test:10}) ok( object.trying("test") == 10, "Cool" ); });
  • 18. What You Are Doing describe('jsonform',function(){ });
  • 19. Establish The Context describe('jsonform',function(){ context('Populate form with json',function(){ } });
  • 20. Specify The Behavior describe('jsonform',function(){ context('Populate form',function(){ it('Json with object nested',function(){ } } });
  • 21. Should describe('jsonform',function(){ context('Populate form',function(){ it('Json with object nested',function(){ jQuery('#jsonform').jsonform(object, function(json) { expect(jQuery(query).val().toString()) .toEqual("1.02.0002"); }); } } });
  • 22. Behaviour BDD provides a “ubiquitous language” for analysis Dan North http://dannorth.net/introducing-bdd/
  • 23. Acceptance As a I want so that
  • 24. Criteria Given some initial context (the givens), When an event occurs, Then ensure some outcomes.
  • 25. ATDD feature('Using jQuery plugin to populate form', function() { summary( 'In order to submit my form', 'As a user', 'I want populate a form with json' ); scenario('The is stopped with the engine off', function() { var object; given('json object', function() { }); and('form html', function() { }); when('I press the start button', function() { }); then('The expected ', function() { expect(expected).toEqual("expected"); }); }); });
  • 26. ATDD feature('Using jQuery plugin to populate form', function() { summary( 'In order to submit my form', 'As a user', 'I want populate a form with json' ); scenario('The is stopped with the engine off', function() { var object; given('json object', function() { object = { nested: {id: 2, name: "Teste"}, array_nested: [ {nested: {id: 3, name: "Teste"} } ], description: "Teste", value: "125,67", date: "12/03/1999" }; }); and('form html', function() { var template = "<form action='#' id='jsonform'> ... </form>"; jQuery(template).appendTo("body"); }); when('I press the start button', function() { jQuery('#jsonform').jsonform(object); }); then('The car should start up', function() { expect(jQuery(query).val().toString()).toEqual("Teste"); }); }); });
  • 27. Daily Development Standup Meeting Pair Up BDD/TDD Cycle Acceptance Model Test Storming Test Code Refactoring Refactoring Code Integrate
  • 28. BDD TDD + DDD (+ATDD)
  • 29. Transition Frontier Broken Software Life Cycle Development Maintenance Desenvolvimento Manutenção Test Test Test Modeling Modeling Modeling Requirements Requirements Requirements Analysis & Design Analysis & Design Analysis & Design Implementation Implementation Implementation Deployment Deployment Deployment Transition frontier no longer makes sense