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.

1

Share

Download to read offline

Testing Your Sites In English with Cucumber

Download to read offline

Chippewa Valley Code Camp slides on my Cucumber talk

Related Books

Free with a 30 day trial from Scribd

See all

Testing Your Sites In English with Cucumber

  1. 1. cucumber testing your sites in English twitter: bphogan email: brianhogan at napcs.com
  2. 2. what causes projects to go over budget? twitter: bphogan email: brianhogan at napcs.com
  3. 3. it’s not always the client’s fault. twitter: bphogan email: brianhogan at napcs.com
  4. 4. bad developer practices + bad management practices twitter: bphogan email: brianhogan at napcs.com
  5. 5. testing can be frustrating. twitter: bphogan email: brianhogan at napcs.com
  6. 6. it can be boring. twitter: bphogan email: brianhogan at napcs.com
  7. 7. it can make things take longer. twitter: bphogan email: brianhogan at napcs.com
  8. 8. and many managers think that programming is like assembly-line work. twitter: bphogan email: brianhogan at napcs.com
  9. 9. so we don’t do it, even though we know we should. twitter: bphogan email: brianhogan at napcs.com
  10. 10. then stuff breaks twitter: bphogan email: brianhogan at napcs.com
  11. 11. and people get mad. twitter: bphogan email: brianhogan at napcs.com
  12. 12. then people lose jobs. twitter: bphogan email: brianhogan at napcs.com
  13. 13. so what do you do? twitter: bphogan email: brianhogan at napcs.com
  14. 14. you make testing automated! twitter: bphogan email: brianhogan at napcs.com
  15. 15. and you improve communication with your clients. by getting them involved. twitter: bphogan email: brianhogan at napcs.com
  16. 16. then get management on board. twitter: bphogan email: brianhogan at napcs.com
  17. 17. everyone has excuses. twitter: bphogan email: brianhogan at napcs.com
  18. 18. it’s the manager’s job to keep projects on schedule twitter: bphogan email: brianhogan at napcs.com
  19. 19. it’s the passionate programmer who fights for quality. twitter: bphogan email: brianhogan at napcs.com
  20. 20. and the client is paying you to build something. twitter: bphogan email: brianhogan at napcs.com
  21. 21. so what can we as developers do to solve these issues? twitter: bphogan email: brianhogan at napcs.com
  22. 22. we need to grab requirements from our customers easier... twitter: bphogan email: brianhogan at napcs.com
  23. 23. we need to make testing fast and easy... twitter: bphogan email: brianhogan at napcs.com
  24. 24. and it needs to be part of the schedule. twitter: bphogan email: brianhogan at napcs.com
  25. 25. domain experts first and code second. twitter: bphogan email: brianhogan at napcs.com
  26. 26. Feature: creating a new page in the wiki As an average anonymous user I want to create a page about Cucumber So that I can tell everyone how awesome it is. Scenario: Creating a new page and editing its content Given I go to "/Cucumber" Then I should see "Edit this page" When I click "Edit this page" And I fill in "body" with "Cucumber is the best way to test apps!" And I press "Save" Then I should see "Cucumber is the best way to test apps!" twitter: bphogan email: brianhogan at napcs.com
  27. 27. features, not requirements. twitter: bphogan email: brianhogan at napcs.com
  28. 28. features are value propositions. twitter: bphogan email: brianhogan at napcs.com
  29. 29. focus on features that have real business value. twitter: bphogan email: brianhogan at napcs.com
  30. 30. As a... I want to... So that I can... twitter: bphogan email: brianhogan at napcs.com
  31. 31. Feature: creating a new page in the wiki As an average anonymous user I want to create a page about Cucumber So that I can tell everyone how awesome it is. twitter: bphogan email: brianhogan at napcs.com
  32. 32. Feature: creating a new page in the wiki As an average anonymous user I want to create a page about Cucumber So that I can help people improve the quality of their sites with automated testing. twitter: bphogan email: brianhogan at napcs.com
  33. 33. Given Then When twitter: bphogan email: brianhogan at napcs.com
  34. 34. scenarios describe the feature in detail. twitter: bphogan email: brianhogan at napcs.com
  35. 35. Given setups, preconditions, prerequisites twitter: bphogan email: brianhogan at napcs.com
  36. 36. Given Scenario: Creating a new page and editing its content Given I go to "/Cucumber" twitter: bphogan email: brianhogan at napcs.com
  37. 37. When describe actions twitter: bphogan email: brianhogan at napcs.com
  38. 38. When When I click "Edit this page" And I fill in "body" with "Cucumber is the best way to test apps!" And I press "Save" twitter: bphogan email: brianhogan at napcs.com
  39. 39. Then describes outcomes twitter: bphogan email: brianhogan at napcs.com
  40. 40. Then Then I should see "Cucumber is the best way to test apps!" twitter: bphogan email: brianhogan at napcs.com
  41. 41. this process helps you get the app designed. twitter: bphogan email: brianhogan at napcs.com
  42. 42. these stories can then be run against live code! twitter: bphogan email: brianhogan at napcs.com
  43. 43. step definitions use Ruby code and regular expressions to run stories. twitter: bphogan email: brianhogan at napcs.com
  44. 44. but you can run stories against any web-based application twitter: bphogan email: brianhogan at napcs.com
  45. 45. Web Application Testing In Ruby twitter: bphogan email: brianhogan at napcs.com
  46. 46. Then I should see "Welcome to the site!" Then /I should see "(.*)"/ do |text| @browser.text.should include(text) end twitter: bphogan email: brianhogan at napcs.com
  47. 47. When I fill in "username" with "bphogan" When /^I fill in "([^"]*)" with "([^"]*)"$/ do |field, value| twitter: bphogan email: brianhogan at napcs.com
  48. 48. your clients and managers don’t need to know HOW these work twitter: bphogan email: brianhogan at napcs.com
  49. 49. they just need to remember a few keywords. twitter: bphogan email: brianhogan at napcs.com
  50. 50. Cucumber prevents feature rot twitter: bphogan email: brianhogan at napcs.com
  51. 51. Demo twitter: bphogan email: brianhogan at napcs.com
  52. 52. twitter: bphogan email: brianhogan at napcs.com
  53. 53. Divide features, bugs, chores, and releases into iterations twitter: bphogan email: brianhogan at napcs.com
  54. 54. feature twitter: bphogan email: brianhogan at napcs.com
  55. 55. feature twitter: bphogan email: brianhogan at napcs.com
  56. 56. Difficulty points are used to calculate velocity twitter: bphogan email: brianhogan at napcs.com
  57. 57. Bugs twitter: bphogan email: brianhogan at napcs.com
  58. 58. fixing bugs counts against you. twitter: bphogan email: brianhogan at napcs.com
  59. 59. Doing stuff nobody sees counts against you twitter: bphogan email: brianhogan at napcs.com
  60. 60. everyone can see scope creep happening. twitter: bphogan email: brianhogan at napcs.com
  61. 61. twitter: bphogan email: brianhogan at napcs.com
  62. 62. constant communication. twitter: bphogan email: brianhogan at napcs.com
  63. 63. questions? http://github.com/napcs/cucumber_watir twitter: bphogan email: brianhogan at napcs.com
  • shinzui

    Nov. 17, 2009

Chippewa Valley Code Camp slides on my Cucumber talk

Views

Total views

12,121

On Slideshare

0

From embeds

0

Number of embeds

86

Actions

Downloads

38

Shares

0

Comments

0

Likes

1

×