Behaviour-Driven Development, Ruby Style
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Behaviour-Driven Development, Ruby Style

  • 1,392 views
Uploaded on

Behaviour-Driven Development, Ruby Style ...

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

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,392
On Slideshare
1,391
From Embeds
1
Number of Embeds
1

Actions

Shares
Downloads
15
Comments
0
Likes
0

Embeds 1

http://www.hanrss.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Behaviour-Driven Development ft. Ruby, Cucumber & RSpec
  • 2. Видове тестванеОбласти за проверка Начини за проверкаProcess Doc ReviewsFunctional ManualSecurity AutomatedPerformance SamplingStress/Load Test DrivenUsability Behavior DrivenGlob/Loc
  • 3. Tестове Ръчни АвтоматизираниКвалификация Средна Висока Удоволствие   Мащаб 0 ∞ Цена $$$$$ $$$
  • 4. Кога да тестваме
  • 5. Agile and automation Add test WatchRefactor Test Fail Run Write Tests Code
  • 6. Test Frameworks за Ruby Cucumber RSpecTest::Minitest Shoulda Test::Unit Steak Riot
  • 7. Cucumber RSpec
  • 8. Първи идват feature тестовете
  • 9. features online_shopping.feature
  • 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. features step_definitions shopping_steps.rb
  • 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. $ 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. Gherkin$ cucumber --i18n helpOver 40 spoken languages
  • 15. Къде саunit tests? specs
  • 16. Test
  • 17. Spec
  • 18. Cucumber + Rspec – задвижванена реализацията отвън - навътре Feature Spec Code Refactor
  • 19. Continuous Integration
  • 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. Spork Spork Rspec & Cucumber successfully started
  • 22. Jenkins
  • 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. ВЪПРОСИ?
  • 25. БЛАГОДАРИМ ВИ!