Your SlideShare is downloading. ×
0
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Oxente BDD
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Oxente BDD

1,354

Published on

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!"

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,354
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
6
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 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 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
  • 4. 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
  • 5. 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
  • 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 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
  • 12. The Three As in TDD Arrange (create an object)‫‏‬ Act (executing a method)‫‏‬ Assert (verifying a result)‫‏‬ Refactoring Workbook, Bill Wake
  • 13. Arrangevar 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. 3Avar object = Object.create({test:10});var verified = object.trying("test");ok( verified == 10 );
  • 17. XUnittest("Trying contents of a propertywithout throwing exception", function(){ var object = Object.create({test:10}) ok( object.trying("test") == 10, "Cool" );});
  • 18. What You Are Doingdescribe(jsonform,function(){});
  • 19. Establish The Contextdescribe(jsonform,function(){ context(Populate form with json,function(){ }});
  • 20. Specify The Behaviordescribe(jsonform,function(){ context(Populate form,function(){ it(Json with object nested,function(){ } }});
  • 21. 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"); }); } }});
  • 22. BehaviourBDD provides a “ubiquitous language” for analysis Dan North http://dannorth.net/introducing-bdd/
  • 23. Acceptance As a I want so that
  • 24. CriteriaGiven some initial context (the givens), When an event occurs, Then ensure some outcomes.
  • 25. 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"); }); });});
  • 26. 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"); }); });});
  • 27. Daily Development Standup Meeting Pair Up BDD/TDD Cycle Acceptance Model Test Storming Test Code Refactoring Refactoring Code Integrate
  • 28. BDDTDD + DDD (+ATDD)
  • 29. 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

×