Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,366
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
46
Comments
0
Likes
8

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