Your SlideShare is downloading. ×
Clean & Dirty Acceptance Tests with Cucumber & Watir
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Clean & Dirty Acceptance Tests with Cucumber & Watir

998
views

Published on

Published in: Technology

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
998
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
5
Comments
0
Likes
1
Embeds 0
No embeds

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. iRedeem Testing Automation Strategy 2
  • 2. Levels of Automated Testing 3
  • 3. Levels of Automated Testing 4
  • 4. Levels of Automated Testing Unit Tests 4
  • 5. Levels of Automated Testing Unit Tests System Integration Tests 4
  • 6. Levels of Automated Testing Unit Tests System Integration Tests Acceptance Criteria Tests 4
  • 7. Levels of Automated Testing Unit Tests System Integration Tests Acceptance Criteria Tests Regression Testing 4
  • 8. Levels of Automated Testing Unit Tests PHP Unit System Integration Tests Acceptance Criteria Tests Regression Testing 4
  • 9. Levels of Automated Testing Unit Tests PHP Unit System Integration Tests ?? Acceptance Criteria Tests Regression Testing 4
  • 10. Levels of Automated Testing Unit Tests PHP Unit System Integration Tests ?? Acceptance Criteria Tests Cucumber & Watir Regression Testing 4
  • 11. Levels of Automated Testing Unit Tests PHP Unit System Integration Tests ?? Acceptance Criteria Tests Cucumber & Watir Regression Testing [Everything] 4
  • 12. Disadvantages of UI Automation using Selenium or Watir 5
  • 13. Disadvantages of UI Automation using Selenium or Watir 6
  • 14. Disadvantages of UI Automation using Selenium or Watir Brittle 6
  • 15. Disadvantages of UI Automation using Selenium or Watir Brittle Time-consuming to Write and Maintain 6
  • 16. Disadvantages of UI Automation using Selenium or Watir Brittle Time-consuming to Write and Maintain Time-consuming to Execute 6
  • 17. An Aside: Why does execution time matter? 7
  • 18. An Aside: Why does execution time matter? Sagar checks in code and the tests run 7
  • 19. An Aside: Why does execution time matter? Sagar checks in code and the tests run Bogdan checks in code an hour later. The tests run 7
  • 20. An Aside: Why does execution time matter? Sagar checks in code and the tests run Bogdan checks in code an hour later. The tests run Two hours later, the build has broken. 7
  • 21. An Aside: Why does execution time matter? Sagar checks in code and the tests run Bogdan checks in code an hour later. The tests run Two hours later, the build has broken. Who broke it? 7
  • 22. Someone would have to bother checking 8
  • 23. Disadvantages of UI Automation using Selenium or Watir Brittle Time-consuming to Write and Maintain Time-consuming to Execute 9
  • 24. How do we minimize these disadvantages? 10
  • 25. How do we minimize these? 11
  • 26. How do we minimize these? 1. Reduce the number of tests. 11
  • 27. How do we minimize these? 1. Reduce the number of tests. 2. Reduce the coupling between tests and data (or make our own data) 11
  • 28. How do we minimize these? 1. Reduce the number of tests. 2. Reduce the coupling between tests and data (or make our own data) 3. Reduce the time it takes to write and modify tests. 11
  • 29. 1. Business Acceptance Criteria 12
  • 30. Business Acceptance Criteria 13
  • 31. Business Acceptance Criteria Core User Paths 13
  • 32. Business Acceptance Criteria Core User Paths Business-critical Stuff 13
  • 33. Business Acceptance Criteria Core User Paths Business-critical Stuff Cannot be allowed to fail 13
  • 34. Business Acceptance Criteria Core User Paths Business-critical Stuff Cannot be allowed to fail Run on CI with every commit 13
  • 35. Business Acceptance Criteria Core User Paths Business-critical Stuff Cannot be allowed to fail Run on CI with every commit Small and very maintainable 13
  • 36. 2. Test Data 14
  • 37. Test Data 15
  • 38. Test Data Defaults Stored in YAML files 15
  • 39. Test Data Defaults Stored in YAML files Koinos and Megento Web APIs used 15
  • 40. Test Data Defaults Stored in YAML files Koinos and Megento Web APIs used Scenario Independence 15
  • 41. 3. Abstractions and Data Models 16
  • 42. 3. Abstractions and Data Models Data from YAML Files easily available 16
  • 43. 17
  • 44. 18
  • 45. 3. Abstractions and Data Models Data from YAML Files easily available 19
  • 46. 3. Abstractions and Data Models Data from YAML Files easily available Data Models to maintain state between steps 19
  • 47. 20
  • 48. 3. Abstractions and Data Models Data from YAML Files easily available Data Models to maintain state between steps 21
  • 49. 3. Abstractions and Data Models Data from YAML Files easily available Data Models to maintain state between steps And for Comparison 21
  • 50. 22
  • 51. 3. Abstractions and Data Models Data from YAML Files easily available Data Models to maintain state between steps And for Comparison 23
  • 52. 3. Abstractions and Data Models Data from YAML Files easily available Data Models to maintain state between steps And for Comparison UI automation for often-used Model-tasks 23
  • 53. 24
  • 54. 25
  • 55. 3. Abstractions and Data Models Data from YAML Files easily available Data Models to maintain state between steps And for Comparison UI automation for often-used Model-tasks 26
  • 56. 3. Abstractions and Data Models Data from YAML Files easily available Data Models to maintain state between steps And for Comparison UI automation for often-used Model-tasks Page Objects to represent pages under test 26
  • 57. 27
  • 58. Exploratory Testing with Cucumber 28
  • 59. Exploratory Testing with Cucumber 29
  • 60. Exploratory Testing with Cucumber Needs to be quick 29
  • 61. Exploratory Testing with Cucumber So it will probably be dirty 30
  • 62. Separating Concerns Clean Code Dirty Code Business AC Bugs / Fine-grained Must always Pass Can switch off Small Suite Larger Suite 31
  • 63. Exploratory Testing with Cucumber 32
  • 64. Given a Bug… 33
  • 65. Given a bug… 34
  • 66. Given a bug… 1. Write a quick (and brittle) feature file 34
  • 67. 35
  • 68. Given a bug… 1. Write a quick (and brittle) feature file 36
  • 69. Given a bug… 1. Write a quick (and brittle) feature file 2. Write some quick (and dirty) step definitions 36
  • 70. 37
  • 71. Given a bug… 1. Write a quick (and brittle) feature file 2. Write some quick (and dirty) step definitions 38
  • 72. Given a bug… 1. Write a quick (and brittle) feature file 2. Write some quick (and dirty) step definitions 3. Check it Fails correctly 38
  • 73. Given a bug… 1. Write a quick (and brittle) feature file 2. Write some quick (and dirty) step definitions 3. Check it Fails correctly 4. Commit and assign ticket to Devs 38
  • 74. When it comes back to FT? 39
  • 75. When it comes back to FT? $ rake t @jira-ird-787 39
  • 76. Regression Testing 40
  • 77. If a Dirty Test Fails? 41
  • 78. If a Dirty Test Fails? Is it the test, or the product? 41
  • 79. If a Dirty Test Fails? Is it the test, or the product? Fix the test 41
  • 80. If a Dirty Test Fails? Is it the test, or the product? Fix the test Or turn it off! 41
  • 81. Separating Concerns Business AC Given… When… Then… YAML Data Dirty Scenarios Data Models EnvConfig Product Category Member Step Definitions Step Definitions Page Objects DashboardPage MemberLoginPage ProductDetailsPage etc… 42 Dirty Page Objects
  • 82. Dirty > Clean 43
  • 83. Questions? 44
  • 84. That’s It 45