SlideShare una empresa de Scribd logo
1 de 18
AUTOMATED
ACCEPTANCE TESTING

Understanding layering and its implications for
tool choice

                                    talks@goneopen.com
Business facing tests

The acceptance test suite as a whole both
verifies that the application delivers the business
value expected by the customer and guards
against regressions or defects that break pre-
existing functions of the application. As such the
acceptance criteria must be executable
specifications. They also pick up problems not
found in unit or component tests.

                               see Farley & Humble, 2010
Layers in Acceptance Tests




                     Farley & Humble, 2010
Layer 1:
Acceptance Criteria
Feature:
Potential customers need to be able to find company information, services and
address details when searching on the internet

Scenario:
 Given I am using google
 When I search for ’XXXXX'
 Then the top result should be ’YYYYYY'

Scenario:
 Given I am using google
 When I search for ’QQQQQQQQ'
 Then the results include the text ’Y2Y2Y2Y2'
Many toolsets: but there are
types

Cucumber                     (ruby, java, .net and many other
ports)

 - uses plain text to arrange tests
Concordion                                     (java, .net)

- uses html to arrange tests
Fitnesse                                       (java, .net)

- uses wiki to arrange tests
Demo


• github.com/toddb/AutomationTutorial
• Sample code for a number of tools, including:
  • cucumber,
  • concordion,
  • fitnesse with fitlibraryweb
Layer 2:
Test Implementation Layer
• Ideally creatable, readable and reportable to
    business
•   Connects the layer above and below in a way that
    is maintainable
•   Usually maintains data setup, teardown or proxies
    and stub data
•   Written in a host language (Ruby, Java, C#) – but
    doesn’t need to the same as the system under
    test
•   Often done as a domain specific language (DSL)
Learnings

• Cucumber: written by coders (devs or testers)
  with the help of simple regular expressions
• Concordion: some tag code is written in html
  and must match that in this code layer
• Fitnesse: there is no test implementation layer
  when using FitLibraryWeb
Also

• Cucumber: ability/need to create application
  abstractions
• Concordion: ability/need to create application
  abstraction
• Fitnesse: this approach it is less domain and
  more technology focussed (although without
  FitLibraryWeb you can create application
  abstractions)
Layer 3:
Application Driver Layer



• Works against our system under test (in this
  example it is the browser against google)
• Abstractions work best as the tests grow –
  eg Window Driver Pattern
3rd Party Adapters
• Cucumber: there are loads of libraries to run
  against particularly in Ruby
• Concordion: Selenium WebDriver is
  effectively built in – but you start working
  harder for the other functionality found in
  FitLibraryWeb
• Fitnesse: FitLibraryWeb is designed to make it
  easy to run against browsers (headless and
  selenium webdriver), webservices
  (SOAP, xml), PDFs, shell scripts, databases &
  creating stub services and proxies
Maintainability: FitLibraryWeb
• Extremely well written and understandable
  abstraction of a technical domain
  (webservices, pdf, proxies, shell)
• We’ve been using the mock webservices
  functionality in our test implementation layer to
  provide stubbed data in concordion
• Demonstrates a DSL standardising tests (and
  abstracts away both the test implementation
  and application driver layers for reuse)
Issues to balance
Collaboration/Communication
• Language used: technical vs natural
• Role focus: developer  business
• Facing: technology  business
Technical
• Data setup/teardown, test doubles
• Test strategy: unit  integration  system
• Test suite size and refactoring support
Exercise
In groups of 3-4, read the scenarios of
companies.

Think through the goals, which layers are most
affected and reason out your tool choice on
how to best verify that their software works!
Exercise: which tool and why?
You are in a company that is moving toward selling all your services via the
internet sales including confirmation via email. Your back office systems are a
mixture of java and mainframe but it are all mediated via soap web services. The
developers say they are unit testing. In practice, most testing occurs after
development ensuring applications work in the high socialised environment.

You are part of a team that supports a real-time system. The regression suite
currently takes two weeks to run through. The team is frustrated and can see that
the test suite is only growing in size and has a lot of duplication. Furthermore, it is
understood by only a few mostly because of it sheer size. They really want tests
they can run at any time to look at the state of the system.

Your team develops a component library. It is used by other customers as part of
their product suite. There have been complaints about its quirky usage.

You are working as part of small, cross-functional team. Your business person
(customer, product owner) is actively involved. There are complex rules - the
subtleties of which often unfold through development and test.
Further areas
Test Automation Pyramid
• Testing is layered. Acceptance testing using these tools is generally a
   subset of system testing. We haven’t looked at how acceptance criteria is
   dealt with in BDD developer-style testing (eg
   JBehave, StoryQ, SpecFlow, rSpec, Spock).
Agile Quadrants Model
• Important for understanding the distinction between business-facing and
   technical-facing tests. Acceptance tests can be either but try to avoid
   conflating the two. Your toolset choice should be aligned
Deployment Pipeline
• Acceptance tests must be automated in continuous delivery. This will
   require work for build scripts and data and configuration management
Specification By Example
• Working as a team through examples is enabled by these sorts of toolsets.
References

• FIT: Framework for Integrated Testing, Mugridge & Cunningham
• Specification By Example, Gojko Adzic
• Chapter 8, Automated Acceptance Testing in Continuous Delivery, Farley &
    Humble
•   http://prezi.com/rpcnvziw80no/specification-by-example-anztb/
•   http://www.slideshare.net/nashjain/acceptance-test-driven-development-
    350264
•   http://gojko.net/2010/10/06/top-10-reasons-why-teams-fail-with-atdd/
•   http://testobsessed.com/wp-content/uploads/2011/04/atddexample.pdf
Good luck
                               Todd Brackley

                               goneopen.com
                               twitter: toddbNZ


  code: github.com/toddb/AutomationTutorial

Más contenido relacionado

La actualidad más candente

How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
Dave Haeffner
 
Lessons learned: Choosing your documentation system
Lessons learned: Choosing your documentation systemLessons learned: Choosing your documentation system
Lessons learned: Choosing your documentation system
Pronovix
 

La actualidad más candente (20)

Selenium + Specflow
Selenium + SpecflowSelenium + Specflow
Selenium + Specflow
 
Automated Acceptance Tests in .NET
Automated Acceptance Tests in .NETAutomated Acceptance Tests in .NET
Automated Acceptance Tests in .NET
 
Test Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and CucumberTest Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and Cucumber
 
Introduction to SoapUI day 1
Introduction to SoapUI day 1Introduction to SoapUI day 1
Introduction to SoapUI day 1
 
Shift left-csun-sagar-barbhaya
Shift left-csun-sagar-barbhayaShift left-csun-sagar-barbhaya
Shift left-csun-sagar-barbhaya
 
Cypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests courseCypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests course
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
 
Automated testing in javascript
Automated testing in javascriptAutomated testing in javascript
Automated testing in javascript
 
Automated tests to a REST API
Automated tests to a REST APIAutomated tests to a REST API
Automated tests to a REST API
 
Lessons learned: Choosing your documentation system
Lessons learned: Choosing your documentation systemLessons learned: Choosing your documentation system
Lessons learned: Choosing your documentation system
 
Continuous delivery - tools and techniques
Continuous delivery - tools and techniquesContinuous delivery - tools and techniques
Continuous delivery - tools and techniques
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
 
Agile Testing
Agile TestingAgile Testing
Agile Testing
 
Jenkins as the Test Reporting Framework
Jenkins as the Test Reporting FrameworkJenkins as the Test Reporting Framework
Jenkins as the Test Reporting Framework
 
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
 
QA Automation testing online training
QA Automation testing online trainingQA Automation testing online training
QA Automation testing online training
 
Hidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script ExtensionsHidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script Extensions
 
Testing Java EE apps with Arquillian
Testing Java EE apps with ArquillianTesting Java EE apps with Arquillian
Testing Java EE apps with Arquillian
 
Three Developer Behaviors to Eliminate 85 Percent of Accessibility Defects
Three Developer Behaviors to Eliminate 85 Percent of Accessibility DefectsThree Developer Behaviors to Eliminate 85 Percent of Accessibility Defects
Three Developer Behaviors to Eliminate 85 Percent of Accessibility Defects
 
Automation Testing Approach for Responsive Web Design
Automation Testing Approach for Responsive Web DesignAutomation Testing Approach for Responsive Web Design
Automation Testing Approach for Responsive Web Design
 

Destacado

Lunch and learn: Cucumber and Capybara
Lunch and learn: Cucumber and CapybaraLunch and learn: Cucumber and Capybara
Lunch and learn: Cucumber and Capybara
Marc Seeger
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
Brandon Keepers
 

Destacado (20)

Lunch and learn: Cucumber and Capybara
Lunch and learn: Cucumber and CapybaraLunch and learn: Cucumber and Capybara
Lunch and learn: Cucumber and Capybara
 
Testing Microservices with a Citrus twist
Testing Microservices with a Citrus twistTesting Microservices with a Citrus twist
Testing Microservices with a Citrus twist
 
Capybara testing
Capybara testingCapybara testing
Capybara testing
 
Bdd (Behavior Driven Development)
Bdd (Behavior Driven Development)Bdd (Behavior Driven Development)
Bdd (Behavior Driven Development)
 
Workshop calabash appium
Workshop calabash appiumWorkshop calabash appium
Workshop calabash appium
 
Arquillian & Citrus
Arquillian & CitrusArquillian & Citrus
Arquillian & Citrus
 
Pruebas funcionales de Software
Pruebas funcionales de SoftwarePruebas funcionales de Software
Pruebas funcionales de Software
 
Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013
 
Three Uses Of JIRA Beyond Bug Tracking
Three Uses Of JIRA Beyond Bug TrackingThree Uses Of JIRA Beyond Bug Tracking
Three Uses Of JIRA Beyond Bug Tracking
 
TestLink introduction
TestLink introductionTestLink introduction
TestLink introduction
 
Introduction To Confluence
Introduction To ConfluenceIntroduction To Confluence
Introduction To Confluence
 
Jira as a Tool for Test Management
Jira as a Tool for Test ManagementJira as a Tool for Test Management
Jira as a Tool for Test Management
 
Using JIRA Software for Issue Tracking
Using JIRA Software for Issue TrackingUsing JIRA Software for Issue Tracking
Using JIRA Software for Issue Tracking
 
Introduction To Jira
Introduction To JiraIntroduction To Jira
Introduction To Jira
 
Test automation with Cucumber-JVM
Test automation with Cucumber-JVMTest automation with Cucumber-JVM
Test automation with Cucumber-JVM
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
 
Writing Software not Code with Cucumber
Writing Software not Code with CucumberWriting Software not Code with Cucumber
Writing Software not Code with Cucumber
 
Next level of Appium
Next level of AppiumNext level of Appium
Next level of Appium
 
Automate you Appium test like a pro!
Automate you Appium test like a pro!Automate you Appium test like a pro!
Automate you Appium test like a pro!
 
Gerrit is Getting Native with RPM, Deb and Docker
Gerrit is Getting Native with RPM, Deb and DockerGerrit is Getting Native with RPM, Deb and Docker
Gerrit is Getting Native with RPM, Deb and Docker
 

Similar a Automated Acceptance Tests & Tool choice

Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1
CIVEL Benoit
 
Встреча "QA: в каких направлениях может найти себя тестировщик?"
Встреча "QA: в каких направлениях может найти себя тестировщик?"Встреча "QA: в каких направлениях может найти себя тестировщик?"
Встреча "QA: в каких направлениях может найти себя тестировщик?"
GoIT
 

Similar a Automated Acceptance Tests & Tool choice (20)

Testing - How Vital and How Easy to use
Testing - How Vital and How Easy to useTesting - How Vital and How Easy to use
Testing - How Vital and How Easy to use
 
Choosing right-automation-tool
Choosing right-automation-toolChoosing right-automation-tool
Choosing right-automation-tool
 
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-54&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
 
How to run an Enterprise PHP Shop
How to run an Enterprise PHP ShopHow to run an Enterprise PHP Shop
How to run an Enterprise PHP Shop
 
Beginners overview of automated testing with Rspec
Beginners overview of automated testing with RspecBeginners overview of automated testing with Rspec
Beginners overview of automated testing with Rspec
 
Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)
 
Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1
 
Встреча "QA: в каких направлениях может найти себя тестировщик?"
Встреча "QA: в каких направлениях может найти себя тестировщик?"Встреча "QA: в каких направлениях может найти себя тестировщик?"
Встреча "QA: в каких направлениях может найти себя тестировщик?"
 
Automation Tool Overview
Automation Tool OverviewAutomation Tool Overview
Automation Tool Overview
 
Automation Tools Overview
Automation Tools OverviewAutomation Tools Overview
Automation Tools Overview
 
Tools for Software Testing
Tools for Software TestingTools for Software Testing
Tools for Software Testing
 
Mayur_Resume (2) (1)
Mayur_Resume (2) (1)Mayur_Resume (2) (1)
Mayur_Resume (2) (1)
 
Resume 2 year
Resume  2 yearResume  2 year
Resume 2 year
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Selva_Selenium
Selva_SeleniumSelva_Selenium
Selva_Selenium
 
Neev QA Offering
Neev QA OfferingNeev QA Offering
Neev QA Offering
 
No Devops Without Continuous Testing
No Devops Without Continuous TestingNo Devops Without Continuous Testing
No Devops Without Continuous Testing
 
Lightning Talks by Globant - Automation (This app runs by itself )
Lightning Talks by Globant -  Automation (This app runs by itself ) Lightning Talks by Globant -  Automation (This app runs by itself )
Lightning Talks by Globant - Automation (This app runs by itself )
 
5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Automated Acceptance Tests & Tool choice

  • 1. AUTOMATED ACCEPTANCE TESTING Understanding layering and its implications for tool choice talks@goneopen.com
  • 2. Business facing tests The acceptance test suite as a whole both verifies that the application delivers the business value expected by the customer and guards against regressions or defects that break pre- existing functions of the application. As such the acceptance criteria must be executable specifications. They also pick up problems not found in unit or component tests. see Farley & Humble, 2010
  • 3. Layers in Acceptance Tests Farley & Humble, 2010
  • 4. Layer 1: Acceptance Criteria Feature: Potential customers need to be able to find company information, services and address details when searching on the internet Scenario: Given I am using google When I search for ’XXXXX' Then the top result should be ’YYYYYY' Scenario: Given I am using google When I search for ’QQQQQQQQ' Then the results include the text ’Y2Y2Y2Y2'
  • 5. Many toolsets: but there are types Cucumber (ruby, java, .net and many other ports) - uses plain text to arrange tests Concordion (java, .net) - uses html to arrange tests Fitnesse (java, .net) - uses wiki to arrange tests
  • 6. Demo • github.com/toddb/AutomationTutorial • Sample code for a number of tools, including: • cucumber, • concordion, • fitnesse with fitlibraryweb
  • 7. Layer 2: Test Implementation Layer • Ideally creatable, readable and reportable to business • Connects the layer above and below in a way that is maintainable • Usually maintains data setup, teardown or proxies and stub data • Written in a host language (Ruby, Java, C#) – but doesn’t need to the same as the system under test • Often done as a domain specific language (DSL)
  • 8. Learnings • Cucumber: written by coders (devs or testers) with the help of simple regular expressions • Concordion: some tag code is written in html and must match that in this code layer • Fitnesse: there is no test implementation layer when using FitLibraryWeb
  • 9. Also • Cucumber: ability/need to create application abstractions • Concordion: ability/need to create application abstraction • Fitnesse: this approach it is less domain and more technology focussed (although without FitLibraryWeb you can create application abstractions)
  • 10. Layer 3: Application Driver Layer • Works against our system under test (in this example it is the browser against google) • Abstractions work best as the tests grow – eg Window Driver Pattern
  • 11. 3rd Party Adapters • Cucumber: there are loads of libraries to run against particularly in Ruby • Concordion: Selenium WebDriver is effectively built in – but you start working harder for the other functionality found in FitLibraryWeb • Fitnesse: FitLibraryWeb is designed to make it easy to run against browsers (headless and selenium webdriver), webservices (SOAP, xml), PDFs, shell scripts, databases & creating stub services and proxies
  • 12. Maintainability: FitLibraryWeb • Extremely well written and understandable abstraction of a technical domain (webservices, pdf, proxies, shell) • We’ve been using the mock webservices functionality in our test implementation layer to provide stubbed data in concordion • Demonstrates a DSL standardising tests (and abstracts away both the test implementation and application driver layers for reuse)
  • 13. Issues to balance Collaboration/Communication • Language used: technical vs natural • Role focus: developer  business • Facing: technology  business Technical • Data setup/teardown, test doubles • Test strategy: unit  integration  system • Test suite size and refactoring support
  • 14. Exercise In groups of 3-4, read the scenarios of companies. Think through the goals, which layers are most affected and reason out your tool choice on how to best verify that their software works!
  • 15. Exercise: which tool and why? You are in a company that is moving toward selling all your services via the internet sales including confirmation via email. Your back office systems are a mixture of java and mainframe but it are all mediated via soap web services. The developers say they are unit testing. In practice, most testing occurs after development ensuring applications work in the high socialised environment. You are part of a team that supports a real-time system. The regression suite currently takes two weeks to run through. The team is frustrated and can see that the test suite is only growing in size and has a lot of duplication. Furthermore, it is understood by only a few mostly because of it sheer size. They really want tests they can run at any time to look at the state of the system. Your team develops a component library. It is used by other customers as part of their product suite. There have been complaints about its quirky usage. You are working as part of small, cross-functional team. Your business person (customer, product owner) is actively involved. There are complex rules - the subtleties of which often unfold through development and test.
  • 16. Further areas Test Automation Pyramid • Testing is layered. Acceptance testing using these tools is generally a subset of system testing. We haven’t looked at how acceptance criteria is dealt with in BDD developer-style testing (eg JBehave, StoryQ, SpecFlow, rSpec, Spock). Agile Quadrants Model • Important for understanding the distinction between business-facing and technical-facing tests. Acceptance tests can be either but try to avoid conflating the two. Your toolset choice should be aligned Deployment Pipeline • Acceptance tests must be automated in continuous delivery. This will require work for build scripts and data and configuration management Specification By Example • Working as a team through examples is enabled by these sorts of toolsets.
  • 17. References • FIT: Framework for Integrated Testing, Mugridge & Cunningham • Specification By Example, Gojko Adzic • Chapter 8, Automated Acceptance Testing in Continuous Delivery, Farley & Humble • http://prezi.com/rpcnvziw80no/specification-by-example-anztb/ • http://www.slideshare.net/nashjain/acceptance-test-driven-development- 350264 • http://gojko.net/2010/10/06/top-10-reasons-why-teams-fail-with-atdd/ • http://testobsessed.com/wp-content/uploads/2011/04/atddexample.pdf
  • 18. Good luck Todd Brackley goneopen.com twitter: toddbNZ code: github.com/toddb/AutomationTutorial