0
BDD + PHP = BehatŁukasz Kużyński – wookieb@wookiebplhttp://wookieb.pl
What is BDD●   BDD = Behavior Driven Development●   technique for testing and develop software●   agile software developme...
What is BDD        Is a state of mind ** http://blog.robustsoftware.co.uk/2009/11/what-is-bdd-behaviour-driven-design.html
BDD in PHP
How Behats tests looks like
Behat scenario schema
Behat scenario - example
Behat - FeatureContext
Behat – First run (with our code)
Same scenario with new values
Scenario Outline
Feature BackgroundExecuted before each scenario
Hooks
Mooore hooksBeforeSuite   BeforeFeature   BeforeaScenario   BeforeStepAfterSuite    AfterFeature    AfterScenario     Afte...
Given, When, Then●   No special meaning in code●   Just a possibility to mark steps●   Increase readability of FeatureCont...
Extend FeatureContextSubstitute for „horizontal inheritance”
Useful contextshttps://github.com/Behat/CommonContexts
PitfallsFeature should be written for humans,not programmers              http://elabs.se/blog/15-you-re-cuking-it-wrong
Can i write „unit tests” in BDD?         It is possible but ...               inefficient
Does BDD is a replacement  for my standard tests         Questions?
Łukasz Kużyński – wookieb@wookiebplhttp://wookieb.pl
Upcoming SlideShare
Loading in...5
×

BDD in PHP - Behat

3,778

Published on

Published in: Technology, Health & Medicine
1 Comment
10 Likes
Statistics
Notes
  • This is the best presentation I have seen online and has certainly persuaded me to try out behat. Thanks.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
3,778
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
52
Comments
1
Likes
10
Embeds 0
No embeds

No notes for slide

Transcript of "BDD in PHP - Behat"

  1. 1. BDD + PHP = BehatŁukasz Kużyński – wookieb@wookiebplhttp://wookieb.pl
  2. 2. What is BDD● BDD = Behavior Driven Development● technique for testing and develop software● agile software development technique● variant of TDD● bridge between programmer and client
  3. 3. What is BDD Is a state of mind ** http://blog.robustsoftware.co.uk/2009/11/what-is-bdd-behaviour-driven-design.html
  4. 4. BDD in PHP
  5. 5. How Behats tests looks like
  6. 6. Behat scenario schema
  7. 7. Behat scenario - example
  8. 8. Behat - FeatureContext
  9. 9. Behat – First run (with our code)
  10. 10. Same scenario with new values
  11. 11. Scenario Outline
  12. 12. Feature BackgroundExecuted before each scenario
  13. 13. Hooks
  14. 14. Mooore hooksBeforeSuite BeforeFeature BeforeaScenario BeforeStepAfterSuite AfterFeature AfterScenario AfterStep
  15. 15. Given, When, Then● No special meaning in code● Just a possibility to mark steps● Increase readability of FeatureContext
  16. 16. Extend FeatureContextSubstitute for „horizontal inheritance”
  17. 17. Useful contextshttps://github.com/Behat/CommonContexts
  18. 18. PitfallsFeature should be written for humans,not programmers http://elabs.se/blog/15-you-re-cuking-it-wrong
  19. 19. Can i write „unit tests” in BDD? It is possible but ... inefficient
  20. 20. Does BDD is a replacement for my standard tests Questions?
  21. 21. Łukasz Kużyński – wookieb@wookiebplhttp://wookieb.pl
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×