Behat 3.0 meetup (March)

6,408 views

Published on

Slides from the presentation of behat v3 in London

Published in: Technology

Behat 3.0 meetup (March)

  1. 1. behat
  2. 2. current state
  3. 3. 468 631 installs since v2.2 (2011-12-14)
  4. 4. Sylius OpenSource E-commerce framework
  5. 5. akeneo OpenSource PIM framework
  6. 6. OpenScholar OpenSource site builder for academic institutions
  7. 7. Drupal.org Big migration driven by Melissa Anderson
  8. 8. INVIQA Enterprise OpenSource agency
  9. 9. The BDD in PHP is big!
  10. 10. Behat
  11. 11. 1. parallel execution
  12. 12. 2. growing contexts
  13. 13. – Me “Context class is your domain dictionary for a specific actor”
  14. 14. – Me “There’s only one context class for all your features.”
  15. 15. 3. actor-based definitions
  16. 16. 3 problems, 1 solution
  17. 17. you should be able to test features against different contexts
  18. 18. v2.x architecture
  19. 19. profile
  20. 20. profile .feature #1
  21. 21. profile .feature #1 .feature #2 .feature #3
  22. 22. profile .feature #1 .feature #2 .feature #3 Your Context class (+ Sub-Context classes)
  23. 23. Context class ! definitions transformations hooks
  24. 24. Context class ! definitions transformations hooks Behat
  25. 25. Context class ! definitions transformations hooks Behat
  26. 26. profile
  27. 27. profile suite #1
  28. 28. profile suite #1 suite #2
  29. 29. Suite is a collection of features and their test configuration
  30. 30. profile suite #1 suite #2 .feature #1 .feature #2 Your Context class
  31. 31. profile suite #1 suite #2 .feature #1 .feature #2 Your Context class .feature #3 .feature #4 Your other Context class
  32. 32. profile suite #1 suite #2 .feature #1 .feature #2 Your Context class .feature #1 .feature #2 Your other Context class
  33. 33. suite config through behat.yml
  34. 34. suite config through behat.yml
  35. 35. stop! demo time.
  36. 36. contexts
  37. 37. profile suite #1 suite #2 .feature #1 .feature #2 Your Context class .feature #1 .feature #2 Your other Context class
  38. 38. profile suite #1 suite #2 .feature #1 .feature #2 Your Context classes .feature #1 .feature #2 Your other Context classes
  39. 39. contexts config through behat.yml
  40. 40. contexts config through behat.yml
  41. 41. demo
  42. 42. definitions matching
  43. 43. @When /^(?:|I )fill in "(?P<field>(?:[^"]|")*)" with "(?P<value>(?:[^"]|")*)"$/
  44. 44. regexp’s are hard
  45. 45. Turnip Gherkin extension for RSpec
  46. 46. Turnip matching through placeholders
  47. 47. @Given there is a monster called :name
  48. 48. @Given there is a monster called :name Given there is a monster called “Jake”
  49. 49. @Given there is a monster called :name Given there is a monster called “Jake” Given there is a monster called ‘Jake’
  50. 50. @Given there is a monster called :name Given there is a monster called “Jake” Given there is a monster called ‘Jake’ Given there is a monster called Jake
  51. 51. @Given there is a monster called :name Given there is a monster called “Jake” Given there is a monster called ‘Jake’ Given there is a monster called Jake Given there is a monster called 23
  52. 52. @Given there is/are :count monster(s)
  53. 53. @Given there is/are :count monster(s) Given there is 1 monster
  54. 54. @Given there is/are :count monster(s) Given there is 1 monster Given there are 5 monsters
  55. 55. @Given there is/are :count monster(s) Given there is 1 monster Given there are 5 monsters Given there are no monsters
  56. 56. Turnip is a new default
  57. 57. both turnip and regex are supported
  58. 58. both turnip and regex are supported inside same context class
  59. 59. SnippetsAcceptingContext
  60. 60. demo
  61. 61. Hooks are the 1st class citizens
  62. 62. hooks blowup in v2.x
  63. 63. demo
  64. 64. Formatters
  65. 65. rewritten from scratch
  66. 66. outline shows step that failed
  67. 67. outline steps expand
  68. 68. and 1000 other small improvements
  69. 69. output buffering
  70. 70. $this->printDebug(‘…’)
  71. 71. demo
  72. 72. Error handling levels
  73. 73. -v
  74. 74. exception handling with Mink or other integrations
  75. 75. exception handling with standard exceptions
  76. 76. -v is not --vv
  77. 77. how
  78. 78. continuous integration through TravisCI
  79. 79. continuous integration through Scrutinizer
  80. 80. v3 in one picture
  81. 81. Testwork
  82. 82. last demo
  83. 83. next steps
  84. 84. 3.0.0 rc3 released and it is gold version
  85. 85. behat.org v2.0 is coming
  86. 86. extensions upgrade
  87. 87. and release…
  88. 88. 20 april
  89. 89. 20 april 2014
  90. 90. big thanks to
  91. 91. Aslak Hellesøy Creator of Cucumber
  92. 92. Christophe Coevoet @stof
  93. 93. Questions?

×