Behaviour-Driven Development    ft. Ruby, Cucumber & RSpec
Видове тестванеОбласти за проверка   Начини за проверкаProcess               Doc ReviewsFunctional            ManualSecuri...
Tестове                Ръчни    АвтоматизираниКвалификация    Средна       Висока Удоволствие                            ...
Цена на дефектите
Agile и автоматизацията               Add test                               WatchRefactor                              Te...
I love the term diversity.         Di-ver-si-ty.Doesn’t that sound great?
Testing Frameworks за Ruby      Cucumber                      RSpecTest::Minitest        Shoulda      Test::Unit          ...
Cucumber           RSpec
Първи идват feature тестовете
features    online_shopping.feature
$ rake cucumberFeature: Online shopping  In order to use the full capabilities  of our online shop  A user  Should be able...
features  step_definitions     shopping_steps.rb
Feature: Online shopping  In order to use the full capabilities  of our online shop  A user  Should be able to make an ord...
$ rake cucumberFeature: Online shopping  In order to use the full capabilities  of our online shop  A user  Should be able...
Gherkin   Над 40 езика$ cucumber --i18n help| ar          | Arabic       |        ‫|العربية‬| bg            Bulgarian    |...
$ rake cucumber# language: bgФункционалност: Пазаруване онлайн  За да използват пълните възможности  на нашия онлайн магаз...
Къде саunit tests?спецификации
Test
Spec
Test vs. Spec
Test vs. Spec
Test vs. Spec
Test vs. Spec
Cucumber + RSpec – задвижванена реализацията отвън - навътре          Feature          Spec          Code          Refactor
WHO BROKETHE BUILD?
Guard        Bundle update        Bundle already up-to-date         RSpec results         197 examples, 0 failures (15 pen...
Spork        Spork        Rspec & Cucumber successfully started
Jenkins
ВЪПРОСИ?
Ресурси• Десетте най-големи софтуерни грешки:  http://themanojblog.blogspot.com/2009/05/  blog-wars-episode-v-historys-top...
Ресурси•   Cucumber: http://cukes.info•   RSpec: http://rspec.info•   Guard: https://github.com/guard/guard•   Spork: http...
Контакти• Георги Кременлиев:  – george@empowerunited.com  – @gssgek• Цветомила Михайлова:  – tsvetomila@empowerunited.com ...
БЛАГОДАРИМ ВИ!
Behavior Driven Development, Ruby Style
Behavior Driven Development, Ruby Style
Behavior Driven Development, Ruby Style
Behavior Driven Development, Ruby Style
Behavior Driven Development, Ruby Style
Behavior Driven Development, Ruby Style
Upcoming SlideShare
Loading in …5
×

Behavior Driven Development, Ruby Style

1,210 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,210
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Behavior Driven Development, Ruby Style

  1. 1. Behaviour-Driven Development ft. Ruby, Cucumber & RSpec
  2. 2. Видове тестванеОбласти за проверка Начини за проверкаProcess Doc ReviewsFunctional ManualSecurity AutomatedPerformance SamplingStress/Load Test DrivenUsability Behavior DrivenGlob/Loc
  3. 3. Tестове Ръчни АвтоматизираниКвалификация Средна Висока Удоволствие   Мащаб 0 ∞ Цена $$$$$ $$$
  4. 4. Цена на дефектите
  5. 5. Agile и автоматизацията Add test WatchRefactor Test Fail Run Write Tests Code
  6. 6. I love the term diversity. Di-ver-si-ty.Doesn’t that sound great?
  7. 7. Testing Frameworks за Ruby Cucumber RSpecTest::Minitest Shoulda Test::Unit Steak
  8. 8. Cucumber RSpec
  9. 9. Първи идват feature тестовете
  10. 10. features online_shopping.feature
  11. 11. $ rake cucumberFeature: Online shopping In order to use the full capabilities of our online shop A user Should be able to make an order Scenario: Buying a beer # features/online_shopping.feature:6 Given that there are 5 beers on stock When Vasko buys 2 beers Then there should be 3 beers left1 scenario (1 undefined)3 steps (3 undefined)0m0.003s
  12. 12. features step_definitions shopping_steps.rb
  13. 13. Feature: Online shopping In order to use the full capabilities of our online shop A user Should be able to make an order Scenario: Buying a beer # features/online_shopping.feature:6 Given that there are 5 beers on stock uninitialized constant Beer (NameError) ./features/step_definitions/online_shopping_steps.rb:5: in `/^that there are (d+) beers on stock$/‘ When Vasko buys 2 beers Then there should be 3 beers leftFailing Scenarios:cucumber features/online_shopping.feature:6 # Scenario: Buying a beer1 scenario (1 failed)3 steps (1 failed, 2 skipped)0m0.469s
  14. 14. $ rake cucumberFeature: Online shopping In order to use the full capabilities of our online shop A user Should be able to make an order Scenario: Buying a beer # features/online_shopping.feature:6 Given that there are 5 beers on stock When Vasko buys 2 beers Then there should be 3 beers left1 scenario (1 passed)3 steps (3 passed)0m0.003s
  15. 15. Gherkin Над 40 езика$ cucumber --i18n help| ar | Arabic | ‫|العربية‬| bg Bulgarian | български || ca | Catalan | català || cs | Czech | Česky || cy-GB | Welsh | Cymraeg || da | Danish | dansk || de | German | Deutsch || en | English | English || en-Scouse | Scouse | Scouse || en-au | Australian | Australian | … … …
  16. 16. $ rake cucumber# language: bgФункционалност: Пазаруване онлайн За да използват пълните възможности на нашия онлайн магазин Потребителите Трябва да могат да правят поръчки Сценарий: Купуване на бира # features/online_shopping.feature:10 Дадено е, че има налични 5 бири Когато Васко купи 2 бири То трябва да останат 3 бири1 scenario (1 passed)3 steps (3 passed)0m0.003s
  17. 17. Къде саunit tests?спецификации
  18. 18. Test
  19. 19. Spec
  20. 20. Test vs. Spec
  21. 21. Test vs. Spec
  22. 22. Test vs. Spec
  23. 23. Test vs. Spec
  24. 24. Cucumber + RSpec – задвижванена реализацията отвън - навътре Feature Spec Code Refactor
  25. 25. WHO BROKETHE BUILD?
  26. 26. Guard Bundle update Bundle already up-to-date RSpec results 197 examples, 0 failures (15 pending) in 12.274 seconds Cucumber Results 13 passed steps
  27. 27. Spork Spork Rspec & Cucumber successfully started
  28. 28. Jenkins
  29. 29. ВЪПРОСИ?
  30. 30. Ресурси• Десетте най-големи софтуерни грешки: http://themanojblog.blogspot.com/2009/05/ blog-wars-episode-v-historys-top-ten.html• Тестване на софтуер: http://en.wikipedia.org/wiki/Software_testing• Допълнитени ресурси: http://www.softwaretestinghelp.com
  31. 31. Ресурси• Cucumber: http://cukes.info• RSpec: http://rspec.info• Guard: https://github.com/guard/guard• Spork: https://github.com/sporkrb/spork• Jenkins: http://jenkins-ci.org/
  32. 32. Контакти• Георги Кременлиев: – george@empowerunited.com – @gssgek• Цветомила Михайлова: – tsvetomila@empowerunited.com – @tsvetomila
  33. 33. БЛАГОДАРИМ ВИ!

×