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

Clean & Dirty Acceptance Tests with Cucumber & Watir

on

  • 940 views

 

Statistics

Views

Total Views
940
Views on SlideShare
939
Embed Views
1

Actions

Likes
1
Downloads
1
Comments
0

1 Embed 1

http://www.slideee.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

    Clean & Dirty Acceptance Tests with Cucumber & Watir Clean & Dirty Acceptance Tests with Cucumber & Watir Presentation Transcript

    • iRedeem Testing Automation Strategy 2
    • Levels of Automated Testing 3
    • Levels of Automated Testing 4
    • Levels of Automated Testing Unit Tests 4
    • Levels of Automated Testing Unit Tests System Integration Tests 4
    • Levels of Automated Testing Unit Tests System Integration Tests Acceptance Criteria Tests 4
    • Levels of Automated Testing Unit Tests System Integration Tests Acceptance Criteria Tests Regression Testing 4
    • Levels of Automated Testing Unit Tests PHP Unit System Integration Tests Acceptance Criteria Tests Regression Testing 4
    • Levels of Automated Testing Unit Tests PHP Unit System Integration Tests ?? Acceptance Criteria Tests Regression Testing 4
    • Levels of Automated Testing Unit Tests PHP Unit System Integration Tests ?? Acceptance Criteria Tests Cucumber & Watir Regression Testing 4
    • Levels of Automated Testing Unit Tests PHP Unit System Integration Tests ?? Acceptance Criteria Tests Cucumber & Watir Regression Testing [Everything] 4
    • Disadvantages of UI Automation using Selenium or Watir 5
    • Disadvantages of UI Automation using Selenium or Watir 6
    • Disadvantages of UI Automation using Selenium or Watir Brittle 6
    • Disadvantages of UI Automation using Selenium or Watir Brittle Time-consuming to Write and Maintain 6
    • Disadvantages of UI Automation using Selenium or Watir Brittle Time-consuming to Write and Maintain Time-consuming to Execute 6
    • An Aside: Why does execution time matter? 7
    • An Aside: Why does execution time matter? Sagar checks in code and the tests run 7
    • 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
    • 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
    • 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
    • Someone would have to bother checking 8
    • Disadvantages of UI Automation using Selenium or Watir Brittle Time-consuming to Write and Maintain Time-consuming to Execute 9
    • How do we minimize these disadvantages? 10
    • How do we minimize these? 11
    • How do we minimize these? 1. Reduce the number of tests. 11
    • 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
    • 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
    • 1. Business Acceptance Criteria 12
    • Business Acceptance Criteria 13
    • Business Acceptance Criteria Core User Paths 13
    • Business Acceptance Criteria Core User Paths Business-critical Stuff 13
    • Business Acceptance Criteria Core User Paths Business-critical Stuff Cannot be allowed to fail 13
    • Business Acceptance Criteria Core User Paths Business-critical Stuff Cannot be allowed to fail Run on CI with every commit 13
    • 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
    • 2. Test Data 14
    • Test Data 15
    • Test Data Defaults Stored in YAML files 15
    • Test Data Defaults Stored in YAML files Koinos and Megento Web APIs used 15
    • Test Data Defaults Stored in YAML files Koinos and Megento Web APIs used Scenario Independence 15
    • 3. Abstractions and Data Models 16
    • 3. Abstractions and Data Models Data from YAML Files easily available 16
    • 17
    • 18
    • 3. Abstractions and Data Models Data from YAML Files easily available 19
    • 3. Abstractions and Data Models Data from YAML Files easily available Data Models to maintain state between steps 19
    • 20
    • 3. Abstractions and Data Models Data from YAML Files easily available Data Models to maintain state between steps 21
    • 3. Abstractions and Data Models Data from YAML Files easily available Data Models to maintain state between steps And for Comparison 21
    • 22
    • 3. Abstractions and Data Models Data from YAML Files easily available Data Models to maintain state between steps And for Comparison 23
    • 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
    • 24
    • 25
    • 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
    • 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
    • 27
    • Exploratory Testing with Cucumber 28
    • Exploratory Testing with Cucumber 29
    • Exploratory Testing with Cucumber Needs to be quick 29
    • Exploratory Testing with Cucumber So it will probably be dirty 30
    • Separating Concerns Clean Code Dirty Code Business AC Bugs / Fine-grained Must always Pass Can switch off Small Suite Larger Suite 31
    • Exploratory Testing with Cucumber 32
    • Given a Bug… 33
    • Given a bug… 34
    • Given a bug… 1. Write a quick (and brittle) feature file 34
    • 35
    • Given a bug… 1. Write a quick (and brittle) feature file 36
    • Given a bug… 1. Write a quick (and brittle) feature file 2. Write some quick (and dirty) step definitions 36
    • 37
    • Given a bug… 1. Write a quick (and brittle) feature file 2. Write some quick (and dirty) step definitions 38
    • 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
    • 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
    • When it comes back to FT? 39
    • When it comes back to FT? $ rake t @jira-ird-787 39
    • Regression Testing 40
    • If a Dirty Test Fails? 41
    • If a Dirty Test Fails? Is it the test, or the product? 41
    • If a Dirty Test Fails? Is it the test, or the product? Fix the test 41
    • If a Dirty Test Fails? Is it the test, or the product? Fix the test Or turn it off! 41
    • 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
    • Dirty > Clean 43
    • Questions? 44
    • That’s It 45