Your SlideShare is downloading. ×
0
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
Full stack BDD for Symfony2
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

Full stack BDD for Symfony2

8,247

Published on

Many Symfony2 developers have heard about Behat and even use it regularly in their Symfony projects. If you have found value in this tool and the BDD practices it was inspired on, come join us for …

Many Symfony2 developers have heard about Behat and even use it regularly in their Symfony projects. If you have found value in this tool and the BDD practices it was inspired on, come join us for this talk as we will expand on what other benefits these practices and other BDD tools available can bring. This very illustrative talk will not only present you with the tools but show how to use them together to build beautifully architected, business-oriented Symfony2 applications.

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

No Downloads
Views
Total Views
8,247
On Slideshare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
61
Comments
0
Likes
15
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. Full Stack BDD for Symfony2 Marcello Duarte Konstantin Kudryashov
  • 2. About usMarcello DuarteHead of TrainingKonstantin KudryashovLead Developer
  • 3. This talk • Where are we coming from • Why BDD • Behat Best Practices • Introducing a new tool
  • 4. from Cucumber to
  • 5. Adults don’t thinktheir way into a new way of acting
  • 6. Adults don’t thinktheir way into a new way of acting They act their way into a new way of thinking
  • 7. Ask Why
  • 8. from xUnit to xSpec HP S pec P
  • 9. ? ? ?? ? ? ? ? Test ? ? ? ? ?? ? ? ? ?
  • 10. code coverage private xUnitdatabase mocking assert structure
  • 11. Language matter
  • 12. public function testUpdateWithEqualTypes(){ $installer = $this->createInstallerMock(); $manager = new InstallationManager(vendor); $manager->addInstaller($installer); $initial = $this->createPackageMock(); $target = $this->createPackageMock(); $operation = new UpdateOperation($initial, $target, test); $initial ->expects($this->once()) ->method(getType) ->will($this->returnValue(library)); $target ->expects($this->once()) ->method(getType) ->will($this->returnValue(library)); $installer ->expects($this->once()) ->method(supports) ->with(library) ->will($this->returnValue(true)); $installer ->expects($this->once()) ->method(update) ->with($this->repository, $initial, $target);
  • 13. Tools matter
  • 14. Why BDD?
  • 15. Requirements Analysis Design Develop Test 9 months 3 months 2 months 12 months ...[Royce 1970]
  • 16. Most of the cost insoftware development is in feedback delay
  • 17. Requirements Acceptance Test Code Refactoring ~20 minutes[Beck & Cunningham 1996-99]
  • 18. Let’s reducefeedback delay
  • 19. Let’s rename a few things
  • 20. Narratives (Why?) Examples (What do you mean?) Describe Object How! Implement Incremental Design[North 03]
  • 21. Building a simpleStudent can enrol on a course feature
  • 22. You can follow our stepshttp://git.io/t4kQ5Q
  • 23. BDD Rules• No examples until you have a red step• No code until you have a red example• No more code than enough to make it green• Don’t get carried away!
  • 24. Behat tips• Favour MinkAwareInterface over MinkContext• Extract context per role• Group features under feature folder• Use Mink API• Integrate with framework at config level
  • 25. PHPSpec2 tips• Describe classes not configuration• Concentrate on messages/behaviours
  • 26. ? ? ?? ? ? ? ?Questions ? ? ? ? ?? ? ? ? ?
  • 27. joind.in/7064 Thanks! :)

×