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

Behavior Driven Development, Ruby Style

on

  • 1,065 views

 

Statistics

Views

Total Views
1,065
Views on SlideShare
1,057
Embed Views
8

Actions

Likes
0
Downloads
7
Comments
0

2 Embeds 8

http://a0.twimg.com 7
http://www.hanrss.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Behavior Driven Development, Ruby Style Presentation 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 и автоматизацията Add test WatchRefactor Test Fail Run Write Tests Code
  • 6. I love the term diversity. Di-ver-si-ty.Doesn’t that sound great?
  • 7. Testing Frameworks за Ruby Cucumber RSpecTest::Minitest Shoulda Test::Unit Steak
  • 8. Cucumber RSpec
  • 9. Първи идват feature тестовете
  • 10. features online_shopping.feature
  • 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. features step_definitions shopping_steps.rb
  • 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. $ 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. 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. $ rake cucumber# language: bgФункционалност: Пазаруване онлайн За да използват пълните възможности на нашия онлайн магазин Потребителите Трябва да могат да правят поръчки Сценарий: Купуване на бира # features/online_shopping.feature:10 Дадено е, че има налични 5 бири Когато Васко купи 2 бири То трябва да останат 3 бири1 scenario (1 passed)3 steps (3 passed)0m0.003s
  • 17. Къде саunit tests?спецификации
  • 18. Test
  • 19. Spec
  • 20. Test vs. Spec
  • 21. Test vs. Spec
  • 22. Test vs. Spec
  • 23. Test vs. Spec
  • 24. Cucumber + RSpec – задвижванена реализацията отвън - навътре Feature Spec Code Refactor
  • 25. WHO BROKETHE BUILD?
  • 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. Spork Spork Rspec & Cucumber successfully started
  • 28. Jenkins
  • 29. ВЪПРОСИ?
  • 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. Ресурси• 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. Контакти• Георги Кременлиев: – george@empowerunited.com – @gssgek• Цветомила Михайлова: – tsvetomila@empowerunited.com – @tsvetomila
  • 33. БЛАГОДАРИМ ВИ!