Upload
samuel-roze
View
3.496
Download
0
Embed Size (px)
Citation preview
BehatC'est plus que ça !
Samuel Roze@samuelroze
Software Engineer at Inviqa SensioLabs UK
ehat@everzet
BDD framework for PHP
Defines a feature with Gherkin
Creates your context file
behat.yml
Something's wrong here...
Something's wrong here...
Something's wrong here...
Technical language
Something's wrong here...
Technical language
Implementation details
Describe your business behaviour, not the implementation
Using examples?
I can still use Mink!
I can still use Mink!
I can still use Mink!
I can still use Mink!
But we can use our objects
But we can use our objects
But we can use our objects
We can also uses the both!
$ bin/behat -‐-‐suite=smoke
order.feature behat.yml
We can also uses the both!
$ bin/behat -‐-‐suite=smoke
order.feature behat.yml
We can also uses the both!
$ bin/behat -‐-‐suite=smoke
order.feature behat.yml
Test this same behaviour on different layers
Inject Symfony2 services in context classes
behat.yml OrderContext.php
Inject Symfony2 services in context classes
behat.yml OrderContext.php
Inject Symfony2 services in context classes
behat.yml OrderContext.php
Inject Symfony2 services in context classes
And the dependencies?
Application
Persistence Third Party APIs
Interfaces
Instead of directly using these external dependencies, we can wrap them behind our interfaces
Using another implementation for your test suites
Using another implementation for your test suites
Using another implementation for your test suites
Using another implementation for your test suites
Using another implementation for your test suites
Using another implementation for your test suites
Using another implementation for your test suites
Use different Symfony environments
Use different Symfony environments
Use different Symfony environments
Use different Symfony environments
Use different Symfony environments
$ bin/behat -‐-‐profile=smoke
Decouple the application from its dependencies
Describe your business behaviour, not the implementation
Takeaways
Describe your business behaviour, not the implementation
Test this same behaviour on different layers
Takeaways
Decouple the application from its dependencies
Describe your business behaviour, not the implementation
Test this same behaviour on different layers
Takeaways
Thank you!
https://joind.in/15260@samuelroze