Behat c'est plus que ça | Behat is more than that

3.162 visualizações

Publicada em

Behat is not just a tool that helps to achieve browser automation. It can be used to test the different layers of applications and to have a better understanding of the domain.

Publicada em: Tecnologia
0 comentários
13 gostaram
Estatísticas
Notas
  • Seja o primeiro a comentar

Sem downloads
Visualizações
Visualizações totais
3.162
No SlideShare
0
A partir de incorporações
0
Número de incorporações
222
Ações
Compartilhamentos
0
Downloads
15
Comentários
0
Gostaram
13
Incorporações 0
Nenhuma incorporação

Nenhuma nota no slide

Behat c'est plus que ça | Behat is more than that

  1. 1. Behat C'est plus que ça !
  2. 2. Samuel Roze @samuelroze Software Engineer at Inviqa SensioLabs UK
  3. 3. ehat@everzet BDD framework for PHP
  4. 4. Defines a feature with Gherkin
  5. 5. Creates your context file
  6. 6. behat.yml
  7. 7. Something's wrong here...
  8. 8. Something's wrong here...
  9. 9. Something's wrong here... Technical language
  10. 10. Something's wrong here... Technical language Implementation details
  11. 11. Describe your business behaviour, not the implementation
  12. 12. Using examples?
  13. 13. I can still use Mink!
  14. 14. I can still use Mink!
  15. 15. I can still use Mink!
  16. 16. I can still use Mink!
  17. 17. But we can use our objects
  18. 18. But we can use our objects
  19. 19. But we can use our objects
  20. 20. We can also uses the both! $  bin/behat  -­‐-­‐suite=smoke order.feature behat.yml
  21. 21. We can also uses the both! $  bin/behat  -­‐-­‐suite=smoke order.feature behat.yml
  22. 22. We can also uses the both! $  bin/behat  -­‐-­‐suite=smoke order.feature behat.yml
  23. 23. Test this same behaviour on different layers
  24. 24. Inject Symfony2 services in context classes behat.yml OrderContext.php
  25. 25. Inject Symfony2 services in context classes behat.yml OrderContext.php
  26. 26. Inject Symfony2 services in context classes behat.yml OrderContext.php
  27. 27. Inject Symfony2 services in context classes
  28. 28. And the dependencies? Application Persistence Third Party APIs
  29. 29. Interfaces Instead of directly using these external dependencies, we can wrap them behind our interfaces
  30. 30. Using another implementation for your test suites
  31. 31. Using another implementation for your test suites
  32. 32. Using another implementation for your test suites
  33. 33. Using another implementation for your test suites
  34. 34. Using another implementation for your test suites
  35. 35. Using another implementation for your test suites
  36. 36. Using another implementation for your test suites
  37. 37. Use different Symfony environments
  38. 38. Use different Symfony environments
  39. 39. Use different Symfony environments
  40. 40. Use different Symfony environments
  41. 41. Use different Symfony environments $  bin/behat  -­‐-­‐profile=smoke
  42. 42. Decouple the application from its dependencies
  43. 43. Describe your business behaviour, not the implementation Takeaways
  44. 44. Describe your business behaviour, not the implementation Test this same behaviour on different layers Takeaways
  45. 45. Decouple the application from its dependencies Describe your business behaviour, not the implementation Test this same behaviour on different layers Takeaways
  46. 46. Thank you! https://joind.in/15260 @samuelroze

×