• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Oxente BDD
 

Oxente BDD

on

  • 1,546 views

Palestra no Marebase2011 com titulo: "Oxente, ramo falar de BDD macho, depois rebola no mato esse codigo réi!"

Palestra no Marebase2011 com titulo: "Oxente, ramo falar de BDD macho, depois rebola no mato esse codigo réi!"

Statistics

Views

Total Views
1,546
Views on SlideShare
1,523
Embed Views
23

Actions

Likes
2
Downloads
5
Comments
0

2 Embeds 23

http://coderwall.com 22
http://twitter.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Oxente BDD Oxente BDD Presentation Transcript

    • 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 IterationsProcess 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 FeedbackProcess 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 TestsProcess 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 PatternsOne Step TestStarter Test Testing Bar PatternsExplanation Test Child TestLearning Test Mock ObjectAnother Test Self ShuntRegression Test Crash Test DummyBreak Broken TestDo 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 As in TDD Arrange (create an object)‫‏‬ Act (executing a method)‫‏‬ Assert (verifying a result)‫‏‬ Refactoring Workbook, Bill Wake
    • Arrangevar 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 );
    • 3Avar object = Object.create({test:10});var verified = object.trying("test");ok( verified == 10 );
    • XUnittest("Trying contents of a propertywithout throwing exception", function(){ var object = Object.create({test:10}) ok( object.trying("test") == 10, "Cool" );});
    • What You Are Doingdescribe(jsonform,function(){});
    • Establish The Contextdescribe(jsonform,function(){ context(Populate form with json,function(){ }});
    • Specify The Behaviordescribe(jsonform,function(){ context(Populate form,function(){ it(Json with object nested,function(){ } }});
    • Shoulddescribe(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"); }); } }});
    • BehaviourBDD provides a “ubiquitous language” for analysis Dan North http://dannorth.net/introducing-bdd/
    • Acceptance As a I want so that
    • CriteriaGiven some initial context (the givens), When an event occurs, Then ensure some outcomes.
    • ATDDfeature(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"); }); });});
    • ATDDfeature(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
    • BDDTDD + DDD (+ATDD)
    • Transition Frontier Broken Software Life Cycle Development Maintenance Desenvolvimento Manutenção Test Test Test Modeling Modeling Modeling Requirements Requirements RequirementsAnalysis & Design Analysis & Design Analysis & Design Implementation Implementation Implementation Deployment Deployment Deployment Transition frontier no longer makes sense