Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

BDD and Cucumber at barcampGZ

1,452 views

Published on

  • Be the first to comment

BDD and Cucumber at barcampGZ

  1. 1. BDD programming the happy way by Leon Du Friday, September 10, 2010
  2. 2. Who Am I • Freelancer / Ruby on Rails developer @guangzhou • github.com/leondu • twitter.com/leondu • flickr.com/leondu • leondu@gmail.com Friday, September 10, 2010
  3. 3. Talk about BDD, aka, Behavior Driven Development • BDD is a second-generation, outside-in, pull-based, multiple-stakeholder, multiple-scale, high-automation, agile methodology . It describes a cycle of interactions with well-defined outputs, resulting in the delivery of working, tested software that matters. --- from wikipedia.org • a set of tools Rspec Cucumber Webrat Capybara email-spec Friday, September 10, 2010
  4. 4. Methodology • Change the way of development • Focus on behavior not only internal structure • Ease the difficulty of communication Friday, September 10, 2010
  5. 5. BDD Cycle Text ---from The RSpec Book Friday, September 10, 2010
  6. 6. ---from The RSpec Book Friday, September 10, 2010
  7. 7. the Tools • RSpec for internal behaviors • Cucumber for system behaviors • Webrat/Capybara/email-spec... for common task steps Friday, September 10, 2010
  8. 8. Cucumber Friday, September 10, 2010
  9. 9. Cucumber Cucumber Features Scenarios Steps http://cukes.info/ Friday, September 10, 2010
  10. 10. Feature • Plain text • Focus on behavior Friday, September 10, 2010
  11. 11. Scenario • Write Scenario with Given/When/Then Friday, September 10, 2010
  12. 12. Step Step definition and is translated to below: Friday, September 10, 2010
  13. 13. Advance topics Preparing data with Examples Friday, September 10, 2010
  14. 14. Advance topics Testing email with email-spec email steps Friday, September 10, 2010
  15. 15. BDD in other world • Java Instinct, JDave, JBehave, BDoc... http://java-sources.org/open-source/bdd • .Net StoryQ http://storyq.codeplex.com/ http://www.codeproject.com/KB/testing/bddintro.aspx Friday, September 10, 2010
  16. 16. Special Thanks To Rain Chen hirainchen@gmail.com Friday, September 10, 2010
  17. 17. Questions? Friday, September 10, 2010

×