Behaviour-Driven Development    ft. Ruby, Cucumber & RSpec
Видове тестванеОбласти за проверка   Начини за проверкаProcess               Doc ReviewsFunctional            ManualSecuri...
Tестове                Ръчни    АвтоматизираниКвалификация    Средна       Висока Удоволствие                            ...
Кога да тестваме
Agile and automation               Add test                               WatchRefactor                              Test ...
Test 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$ cucumber --i18n helpOver 40 spoken languages
Къде саunit tests?        specs
Test
Spec
Cucumber + Rspec – задвижванена реализацията отвън - навътре          Feature          Spec          Code          Refactor
Continuous Integration
Guard        Bundle update        Bundle already up-to-date         RSpec results         197 examples, 0 failures (15 pen...
Spork        Spork        Rspec & Cucumber successfully started
Jenkins
Ресурси• Top ten software bugs:  http://themanojblog.blogspot.com/2009/05/  blog-wars-episode-v-historys-top-ten.html• Тес...
ВЪПРОСИ?
БЛАГОДАРИМ ВИ!
Behaviour-Driven Development, Ruby Style
Behaviour-Driven Development, Ruby Style
Behaviour-Driven Development, Ruby Style
Behaviour-Driven Development, Ruby Style
Upcoming SlideShare
Loading in …5
×

Behaviour-Driven Development, Ruby Style

1,203 views

Published on

Behaviour-Driven Development, Ruby Style
Цветомила Михайлова

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,203
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
17
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Behaviour-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 and automation Add test WatchRefactor Test Fail Run Write Tests Code
  6. 6. Test Frameworks за Ruby Cucumber RSpecTest::Minitest Shoulda Test::Unit Steak Riot
  7. 7. Cucumber RSpec
  8. 8. Първи идват feature тестовете
  9. 9. features online_shopping.feature
  10. 10. $ 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
  11. 11. features step_definitions shopping_steps.rb
  12. 12. 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
  13. 13. $ 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
  14. 14. Gherkin$ cucumber --i18n helpOver 40 spoken languages
  15. 15. Къде саunit tests? specs
  16. 16. Test
  17. 17. Spec
  18. 18. Cucumber + Rspec – задвижванена реализацията отвън - навътре Feature Spec Code Refactor
  19. 19. Continuous Integration
  20. 20. 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
  21. 21. Spork Spork Rspec & Cucumber successfully started
  22. 22. Jenkins
  23. 23. Ресурси• Top ten software bugs: 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• Cucumber: http://cukes.info• RSpec: http://rspec.info
  24. 24. ВЪПРОСИ?
  25. 25. БЛАГОДАРИМ ВИ!

×