evelopment of Behat and PHPSpec tools cause, that BDD started to show up in minds of PHP developers. How we currently understand this methodology? Is it become effective and helpful in our everyday work? What problems and fails we can meet during tries of applying this methodology to our project?
During this talk, you will see how we can use BDD for modeling our application. One of the benefits will be an application that is not hardly coupled with the framework. So, it will give you the possibility of easy integration with that kind of tool. Also integrating with other infrastructure elements will be easy to implement. Everything thanks to use of ports and adapters approach.
16. Story BDD
● Describing high level business application behaviour.
● Helps to elaborate what the needs are
● Helps communicate with business
● Helps to elaborate common language
● Gives us scenarios that can (and should) become
automated functional tests
17. Spec BDD
● Describing low level implementation behaviour
● To design our code
● To design how it communicate
● Helps understand what code is doing
● Helps get back to your code after while
18. BDD - tools
● Spec:
○ PHPSpec
○ Spec classes with examples
● Story
○ Behat
○ Scenarios written in gherkin language
○ Automation of scenarios in context classes
21. Let’s describe everything!
● every link click
● every input fill
● every automatically generated crud
● every screen generated by some admin bundle
● EVERYTHING!
**That applies also to Spec BDD**
78. Further actions
examples
● using command bus
● encapsulate transactions
● validation on framework side
● dispatching events
● integration tests
79. Summary
● BDD helps with design process
● framework agnostic application
is easy to integrate
● testability
● understand of business
● understand of development
process
● ability to postpone
infrastructure decisions