Clean & Dirty Acceptance Tests with Cucumber & Watir

50 %
50 %
Information about Clean & Dirty Acceptance Tests with Cucumber & Watir
Technology

Published on February 19, 2014

Author: dannysmith

Source: slideshare.net

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

Add a comment

Related presentations

Related pages

Clean & Dirty Acceptance Tests with Cucumber & Watir ...

1. iRedeem Testing Automation Strategy 2 ; 2. Levels of Automated Testing 3
Read more

Clean & Dirty Acceptance Tests with Cucumber & Watir ...

Speaker Details. Blues Musician. Trainer. Designer at @manyhatsdesign. From Brighton, England. View Speaker Details
Read more

Watir web automated tests - Technology - documents.mx

Watir is an open-source Ruby libraries. ... Clean & Dirty Acceptance Tests with Cucumber & Watir. Why Automated Tests. Why Automated Tests. Automated ...
Read more

Managing dependencies between automated tests – WatirMelon ...

Targeted acceptance tests will still ... cucumber , watir ... you may like to utilize some scripts to quickly set up the data set and clean up the dirty ...
Read more

Transformer Factory Acceptance Tests - Documents

Transformer Factory Acceptance Tests. by 29oberon. on Apr 08, 2015. Report Category: Documents. Download: 4 Comment: 0. 6,754. views. Comments. Description.
Read more

Acceptance Tests - Documents

Acceptance Tests. Determining That a Story Is Complete. Acceptance Tests. Also called Customer Written Tests Should be developed by or with the customer ...
Read more

Clean Car Vs dirty - Documents - docslide.us

Clean car vs. Dirty car Clean car vs. Dirty car How to save your cash? 1 Pegah Asgari Can you explain why a golf ball has dimples? 2 The difference in the ...
Read more