SlideShare une entreprise Scribd logo
1  sur  46
Télécharger pour lire hors ligne
Automated
Functional
Testing
John Ferguson Smart
Consultant
Trainer
Mentor
Author
Speaker
Coder
Technical Agile Practices
Test Driven Development
Continuous Integration/Delivery
Automated
Acceptance Criteria
Refactoring
Pair
Programming
“Without	
  these	
  technical	
  prac1ces,	
  your	
  agile	
  adop1on	
  is	
  hollow”
-­‐	
  Ma6	
  Wynne
Technical Agile Practices
Test Driven Development
Continuous Integration/Delivery
Automated
Acceptance Criteria
Refactoring
Pair
Programming
“Without	
  these	
  technical	
  prac1ces,	
  your	
  agile	
  adop1on	
  is	
  hollow”
-­‐	
  Ma6	
  Wynne
A	
  good	
  func<onal	
  test	
  tells	
  a	
  story
Practices
Tools
QA loses its potential if only done
at the end of the project
The Three Amigos
Living Documentation - test results that serve everyone
So show me the tools!
The Record-Replay Scam
in theory
in practice
The Record-Replay Scam
What do ogres and good functional tests have in common?
(This test is not like an ogre)
Remember...good automated acceptance tests have layers
Start off with the business objectives
Business-­‐level	
  requirements
Describe the business flow
High-­‐level	
  steps	
  
(business	
  flow)
Describe the page interactions
Page-­‐level	
  interac<ons
Page implementation details
HTML	
  details	
  go	
  here
Business	
  Rules
Business	
  Flow
Page/Component	
  
interac<ons
Page/Component	
  
details
Good automated acceptance tests have layers
Come on - can we see the tools now?
Unit	
  tes<ng	
  BDD	
  tools	
  (39%)
Given/When/Then	
  (40%)
Tabular	
  (13%)
WebDriver / Selenium 2
Mature	
  browser	
  automa<on
Wide	
  adop<on
Cross-­‐browser	
  support
Cross-­‐browser	
  support
...or	
  use	
  Selenium	
  Hub
appium
Uses	
  the	
  WebDriver	
  API
Can	
  run	
  on	
  SauceLabs	
  (with	
  some	
  limita<ons)
Watir
Web Application Testing in Ruby
browser.goto 'http://bit.ly/watir-example'
browser.text_field(:name => 'entry.0.single').set 'Watir'
browser.checkbox(:value => 'Ruby').set
Ruby	
  DSL	
  for	
  web	
  tes<ng
WebDriver-­‐based
Fluent	
  and	
  readable
No	
  na<ve	
  support	
  for	
  
Page	
  Objects?
Geb
Groovy Browser Automation
Browser.drive	
  {
	
  	
  	
  	
  go	
  "http://myapp.com/login"
	
  	
  	
  	
  	
  
	
  	
  	
  	
  assert	
  $("h1").text()	
  ==	
  "Please	
  Login"
	
  	
  	
  	
  	
  
	
  	
  	
  	
  $("form.login").with	
  {
	
  	
  	
  	
  	
  	
  	
  	
  username	
  =	
  "admin"
	
  	
  	
  	
  	
  	
  	
  	
  password	
  =	
  "password"
	
  	
  	
  	
  	
  	
  	
  	
  login().click()
	
  	
  	
  	
  }
	
  	
  	
  	
  	
  
	
  	
  	
  	
  assert	
  $("h1").text()	
  ==	
  "Admin	
  Section"
}
Groovy	
  DSL	
  for	
  web	
  tes<ng
WebDriver-­‐based
Fluent	
  and	
  readable
Supports	
  Page	
  Objects
28
High level BDD
Many	
  tools	
  are	
  available
29
Narrative:
In order to increase sales of advertised articles
As a seller
I want buyers to be able to easily find ads for articles they want
to buy
Scenario: Searching by keyword and location
Given Sally wants to buy a puppy for her son
When she looks for 'puppy' in the 'Pets and Animals' category
Then she should obtain a list of ads for puppies for sale.
search_by_keyword_and_location.story
Business-­‐friendly	
  specifica<ons
An	
  example	
  in	
  JBehave
30
Scenario: Searching by keyword and location
Given Sally wants to buy a puppy for her son
When she looks for 'puppy' in the 'Pets and Animals' category
Then she should obtain a list of ads for puppies for sale.
search_by_keyword_and_location.story
Scenario: Searching by keyword and location
Given Sally wants to buy a <present> for her son
When she looks for '<present>' in the '<category>' category
Then she should obtain a list of ads for <expected> for sale.
Examples:
|present |category |expected|
|puppy |Pets & Animals | puppies|
|kitten |Pets & Animals | kittens|
|seiko |Jewellery & Watches| watch |
Tabular	
  examples
31
Scenario: Searching by keyword and location
Given Sally wants to buy a puppy for her son
When she looks for 'puppy' in the 'Pets and Animals' category
Then she should obtain a list of puppy ads
search_by_keyword_and_location.story
public class SearchAdsSteps {
    @Steps
    BuyerSteps buyer;
    @Given("Sally wants to buy a $present for her son")
    public void buyingAPresent(String present) {
        buyer.opens_home_page();
    }
    @When("she looks for $keyword in the $category category")
    public void adSearchByCategoryAndKeyword(String category, String keyword) {
        buyer.chooses_category_and_keywords(category, keyword);
        buyer.performs_search();
    }
    @Then("she should obtain a list of $keyword ads")
    public void shouldOnlySeeAdsContainingKeyword(String keyword) {
        buyer.should_only_see_results_with_titles_containing(keyword);
    }
}
Step	
  implementa<ons	
  in	
  your	
  
favorite	
  language
32
From web tests to living
documentation
33
(Think “Two-CDs”)
34
2 Automate your acceptance criteria
1 Discover your acceptance criteria
4 Execute your acceptance tests
3 Implement your acceptance criteria
35
1 Discover your acceptance criteria
Feature: Browse Catalog
In order to find items that I would like to buy
As a customer
I want to be able to browse through the catalog
Story: Browse by category
In order to find items more easily
As a customer
I want to be able to browse through the product categories
Acceptance Criteria
See all the top-level categories
Browse through the category hierarchy
Should display the correct products for each category
Each category should have the correct sub-categories
Define	
  acceptance	
  criteria	
  for	
  each	
  story
36
1 Discover your acceptance criteria
Acceptance Criteria
See all the top-level categories
Browse through the category hierarchy
Should display the correct products for each category
Each category should have the correct sub-categories
Scenario: See all top-level categories
Given I want to browse the catalog
When I am on the home page
Then I should see the following product categories: Clothing, Accessories, Shoes
Clarify	
  the	
  acceptance	
  criteria	
  with	
  examples
37
2 Automate your acceptance criteria
Story: Browse by category
In order to find items more easily
As a customer
I want to be able to browse through the product categories
Acceptance Criteria
See all the top-level categories
Browse through the category hierarchy
Should display the correct products for each category
Each category should have the correct sub-categories
Scenario: See all top-level categories
Given I want to browse the catalog
When I am on the home page
Then I should see the following product categories: Clothing, Accessories, Shoes
Narrative:
In order to find items more easily
As a customer
I want to be able to see what product categories exist
Scenario: See all top-level categories
Given I want to browse the catalog
When I am on the home page
Then I should see the following product categories: Clothing, Accessories, Shoes
We	
  now	
  have	
  executable	
  specifica<ons
38
2 Automate your acceptance criteria
...but	
  they	
  are	
  reported	
  
as	
  ‘pending’
39
3 Implement your acceptance criteria
Narrative:
In order to find items more easily
As a customer
I want to be able to see what product categories exist
Scenario: See all top-level categories
Given I want to browse the catalog
When I am on the home page
Then I should see the following product categories: Clothing, Accessories, Shoes
40
4 Execute your acceptance tests
What	
  tests	
  have	
  been	
  run
41
What	
  requirements	
  
have	
  been	
  tested?
4 Execute your acceptance tests
42
4 Execute your acceptance tests
How	
  did	
  we	
  show	
  that	
  a	
  
par<cular	
  requirement	
  
worked?
43
4 Execute your acceptance tests
How	
  did	
  we	
  show	
  that	
  a	
  
par<cular	
  requirement	
  
worked?
Demo
time!
hYp://wakaleo.com
hYp://thucydides.info
Want	
  to	
  learn	
  more?
John	
  Ferguson	
  Smart
Thank you

Contenu connexe

En vedette

Test Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comTest Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comIdexcel Technologies
 
Functional and Non-functional Test automation
Functional and Non-functional Test automationFunctional and Non-functional Test automation
Functional and Non-functional Test automationDr Ganesh Iyer
 
Building the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for TestersBuilding the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for TestersWilliam Echlin
 
functional testing
functional testing functional testing
functional testing bharathanche
 
T-Mobile Customer Presentation
T-Mobile Customer PresentationT-Mobile Customer Presentation
T-Mobile Customer PresentationSplunk
 
Automation testing IBM RFT - Rational Functional Tester
Automation testing IBM RFT - Rational Functional TesterAutomation testing IBM RFT - Rational Functional Tester
Automation testing IBM RFT - Rational Functional TesterVijayChowthri Nagaprakasham
 
Introduction to Test Automation - Technology and Tools
Introduction to Test Automation - Technology and ToolsIntroduction to Test Automation - Technology and Tools
Introduction to Test Automation - Technology and ToolsKMS Technology
 
Automation testing strategy, approach & planning
Automation testing  strategy, approach & planningAutomation testing  strategy, approach & planning
Automation testing strategy, approach & planningSivaprasanthRentala1975
 
How can insurers benefit from using ISO Electronic Rating Content?
How can insurers benefit from using ISO Electronic Rating Content?How can insurers benefit from using ISO Electronic Rating Content?
How can insurers benefit from using ISO Electronic Rating Content?ValueMomentum
 
Keyword Driven Framework using WATIR
Keyword Driven Framework using WATIRKeyword Driven Framework using WATIR
Keyword Driven Framework using WATIRNivetha Padmanaban
 
Functionality testing techniqu
Functionality testing techniquFunctionality testing techniqu
Functionality testing techniqugaoliang641
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation TestingArchana Krushnan
 
Measuring your way_to_successful_automation_webinar
Measuring your way_to_successful_automation_webinarMeasuring your way_to_successful_automation_webinar
Measuring your way_to_successful_automation_webinarSauce Labs
 

En vedette (20)

Test Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comTest Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.com
 
XStudio
XStudioXStudio
XStudio
 
Functional and Non-functional Test automation
Functional and Non-functional Test automationFunctional and Non-functional Test automation
Functional and Non-functional Test automation
 
Building the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for TestersBuilding the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for Testers
 
functional testing
functional testing functional testing
functional testing
 
T-Mobile Customer Presentation
T-Mobile Customer PresentationT-Mobile Customer Presentation
T-Mobile Customer Presentation
 
Automation testing IBM RFT - Rational Functional Tester
Automation testing IBM RFT - Rational Functional TesterAutomation testing IBM RFT - Rational Functional Tester
Automation testing IBM RFT - Rational Functional Tester
 
Introduction to Test Automation - Technology and Tools
Introduction to Test Automation - Technology and ToolsIntroduction to Test Automation - Technology and Tools
Introduction to Test Automation - Technology and Tools
 
Automation testing strategy, approach & planning
Automation testing  strategy, approach & planningAutomation testing  strategy, approach & planning
Automation testing strategy, approach & planning
 
How can insurers benefit from using ISO Electronic Rating Content?
How can insurers benefit from using ISO Electronic Rating Content?How can insurers benefit from using ISO Electronic Rating Content?
How can insurers benefit from using ISO Electronic Rating Content?
 
Watir web automated tests
Watir web automated testsWatir web automated tests
Watir web automated tests
 
Selenium Primer
Selenium PrimerSelenium Primer
Selenium Primer
 
Watir
WatirWatir
Watir
 
Keyword Driven Framework using WATIR
Keyword Driven Framework using WATIRKeyword Driven Framework using WATIR
Keyword Driven Framework using WATIR
 
Functionality testing techniqu
Functionality testing techniquFunctionality testing techniqu
Functionality testing techniqu
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation Testing
 
Measuring your way_to_successful_automation_webinar
Measuring your way_to_successful_automation_webinarMeasuring your way_to_successful_automation_webinar
Measuring your way_to_successful_automation_webinar
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Serenity and the Journey Pattern
Serenity and the Journey PatternSerenity and the Journey Pattern
Serenity and the Journey Pattern
 
Selenium Webdriver
Selenium WebdriverSelenium Webdriver
Selenium Webdriver
 

Similaire à Functional testing the_good_the_bad_and_the_ugly

Bdd state-of-the-union (Devoxx and XPDays version)
Bdd state-of-the-union (Devoxx and XPDays version)Bdd state-of-the-union (Devoxx and XPDays version)
Bdd state-of-the-union (Devoxx and XPDays version)John Ferguson Smart Limited
 
Automated UI test on mobile - with Cucumber/Calabash
Automated UI test on mobile - with Cucumber/CalabashAutomated UI test on mobile - with Cucumber/Calabash
Automated UI test on mobile - with Cucumber/CalabashNiels Frydenholm
 
Cross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlowCross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlowChristian Hassa
 
Sales force certification-lab
Sales force certification-labSales force certification-lab
Sales force certification-labAmit Sharma
 
Inbound Growth for SaaS Scale-Ups #INBOUND18
Inbound Growth for SaaS Scale-Ups #INBOUND18Inbound Growth for SaaS Scale-Ups #INBOUND18
Inbound Growth for SaaS Scale-Ups #INBOUND18Hull
 
How to get Automated Testing "Done"
How to get Automated Testing "Done"How to get Automated Testing "Done"
How to get Automated Testing "Done"TEST Huddle
 
State of Search - Targeted marketing strategy using local and competitor data
State of Search - Targeted marketing strategy using local and competitor dataState of Search - Targeted marketing strategy using local and competitor data
State of Search - Targeted marketing strategy using local and competitor dataDemandSphere
 
Sales force certification-lab
Sales force certification-labSales force certification-lab
Sales force certification-labAmit Sharma
 
Building Device Agnostic UX systems - GeekGirl, London 28 Oct 2014
Building Device Agnostic UX systems - GeekGirl, London 28 Oct 2014Building Device Agnostic UX systems - GeekGirl, London 28 Oct 2014
Building Device Agnostic UX systems - GeekGirl, London 28 Oct 2014Anna Dahlström
 
Specification-By-Example with Gherkin
Specification-By-Example with GherkinSpecification-By-Example with Gherkin
Specification-By-Example with GherkinChristian Hassa
 
Audelyaustria research presentation
Audelyaustria research presentationAudelyaustria research presentation
Audelyaustria research presentationaudelyaustria1
 
Issie Hannah - Brighton SEO Slides 2023.pptx
Issie Hannah - Brighton SEO Slides 2023.pptxIssie Hannah - Brighton SEO Slides 2023.pptx
Issie Hannah - Brighton SEO Slides 2023.pptxIssieHannah
 
Search Engine Op[timization (Seo) bangla tutorial(2)
Search Engine Op[timization (Seo) bangla tutorial(2)Search Engine Op[timization (Seo) bangla tutorial(2)
Search Engine Op[timization (Seo) bangla tutorial(2)Mohammad Juel Rana
 

Similaire à Functional testing the_good_the_bad_and_the_ugly (20)

To atdd-and-beyond
To atdd-and-beyondTo atdd-and-beyond
To atdd-and-beyond
 
Bdd state-of-the-union (Devoxx and XPDays version)
Bdd state-of-the-union (Devoxx and XPDays version)Bdd state-of-the-union (Devoxx and XPDays version)
Bdd state-of-the-union (Devoxx and XPDays version)
 
Bdd state-of-the-union
Bdd state-of-the-unionBdd state-of-the-union
Bdd state-of-the-union
 
Automated UI test on mobile - with Cucumber/Calabash
Automated UI test on mobile - with Cucumber/CalabashAutomated UI test on mobile - with Cucumber/Calabash
Automated UI test on mobile - with Cucumber/Calabash
 
ECM-PPC-Session
ECM-PPC-SessionECM-PPC-Session
ECM-PPC-Session
 
Cross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlowCross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlow
 
RPC-Week5-PPC-Session
RPC-Week5-PPC-SessionRPC-Week5-PPC-Session
RPC-Week5-PPC-Session
 
Sales force certification-lab
Sales force certification-labSales force certification-lab
Sales force certification-lab
 
Inbound Growth for SaaS Scale-Ups #INBOUND18
Inbound Growth for SaaS Scale-Ups #INBOUND18Inbound Growth for SaaS Scale-Ups #INBOUND18
Inbound Growth for SaaS Scale-Ups #INBOUND18
 
How to get Automated Testing "Done"
How to get Automated Testing "Done"How to get Automated Testing "Done"
How to get Automated Testing "Done"
 
State of Search - Targeted marketing strategy using local and competitor data
State of Search - Targeted marketing strategy using local and competitor dataState of Search - Targeted marketing strategy using local and competitor data
State of Search - Targeted marketing strategy using local and competitor data
 
RPC-PPC-Session
RPC-PPC-SessionRPC-PPC-Session
RPC-PPC-Session
 
Sales force certification-lab
Sales force certification-labSales force certification-lab
Sales force certification-lab
 
Building Device Agnostic UX systems - GeekGirl, London 28 Oct 2014
Building Device Agnostic UX systems - GeekGirl, London 28 Oct 2014Building Device Agnostic UX systems - GeekGirl, London 28 Oct 2014
Building Device Agnostic UX systems - GeekGirl, London 28 Oct 2014
 
Specification-By-Example with Gherkin
Specification-By-Example with GherkinSpecification-By-Example with Gherkin
Specification-By-Example with Gherkin
 
Audelyaustria research presentation
Audelyaustria research presentationAudelyaustria research presentation
Audelyaustria research presentation
 
Keyword research webinar 256
Keyword research   webinar 256Keyword research   webinar 256
Keyword research webinar 256
 
User Stories
User StoriesUser Stories
User Stories
 
Issie Hannah - Brighton SEO Slides 2023.pptx
Issie Hannah - Brighton SEO Slides 2023.pptxIssie Hannah - Brighton SEO Slides 2023.pptx
Issie Hannah - Brighton SEO Slides 2023.pptx
 
Search Engine Op[timization (Seo) bangla tutorial(2)
Search Engine Op[timization (Seo) bangla tutorial(2)Search Engine Op[timization (Seo) bangla tutorial(2)
Search Engine Op[timization (Seo) bangla tutorial(2)
 

Plus de John Ferguson Smart Limited

Artisti e Condotierri - How can your team become artists of the 21st century ...
Artisti e Condotierri - How can your team become artists of the 21st century ...Artisti e Condotierri - How can your team become artists of the 21st century ...
Artisti e Condotierri - How can your team become artists of the 21st century ...John Ferguson Smart Limited
 
Engage! Bringing teams together to deliver software that makes a difference
Engage! Bringing teams together to deliver software that makes a differenceEngage! Bringing teams together to deliver software that makes a difference
Engage! Bringing teams together to deliver software that makes a differenceJohn Ferguson Smart Limited
 
Sustainable Test Automation with Serenity BDD and Screenplay
Sustainable Test Automation with Serenity BDD and ScreenplaySustainable Test Automation with Serenity BDD and Screenplay
Sustainable Test Automation with Serenity BDD and ScreenplayJohn Ferguson Smart Limited
 
Screenplay - Next generation automated acceptance testing
Screenplay - Next generation automated acceptance testingScreenplay - Next generation automated acceptance testing
Screenplay - Next generation automated acceptance testingJohn Ferguson Smart Limited
 
All the world's a stage – the next step in automated testing practices
All the world's a stage – the next step in automated testing practicesAll the world's a stage – the next step in automated testing practices
All the world's a stage – the next step in automated testing practicesJohn Ferguson Smart Limited
 
BDD in Action - Automated Web Testing with WebDriver and Serenity
BDD in Action - Automated Web Testing with WebDriver and SerenityBDD in Action - Automated Web Testing with WebDriver and Serenity
BDD in Action - Automated Web Testing with WebDriver and SerenityJohn Ferguson Smart Limited
 
BDD in Action: Building Software Right and Building the Right Software
BDD in Action: Building Software Right and Building the Right SoftwareBDD in Action: Building Software Right and Building the Right Software
BDD in Action: Building Software Right and Building the Right SoftwareJohn Ferguson Smart Limited
 
BDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationBDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationJohn Ferguson Smart Limited
 

Plus de John Ferguson Smart Limited (20)

Artisti e Condotierri - How can your team become artists of the 21st century ...
Artisti e Condotierri - How can your team become artists of the 21st century ...Artisti e Condotierri - How can your team become artists of the 21st century ...
Artisti e Condotierri - How can your team become artists of the 21st century ...
 
Engage! Bringing teams together to deliver software that makes a difference
Engage! Bringing teams together to deliver software that makes a differenceEngage! Bringing teams together to deliver software that makes a difference
Engage! Bringing teams together to deliver software that makes a difference
 
BE A POD OF DOLPHINS, NOT A DANCING ELEPHANT
BE A POD OF DOLPHINS, NOT A DANCING ELEPHANTBE A POD OF DOLPHINS, NOT A DANCING ELEPHANT
BE A POD OF DOLPHINS, NOT A DANCING ELEPHANT
 
Sustainable Test Automation with Serenity BDD and Screenplay
Sustainable Test Automation with Serenity BDD and ScreenplaySustainable Test Automation with Serenity BDD and Screenplay
Sustainable Test Automation with Serenity BDD and Screenplay
 
Feature Mapping Workshop
Feature Mapping WorkshopFeature Mapping Workshop
Feature Mapping Workshop
 
Shift left-devoxx-pl
Shift left-devoxx-plShift left-devoxx-pl
Shift left-devoxx-pl
 
Screenplay - Next generation automated acceptance testing
Screenplay - Next generation automated acceptance testingScreenplay - Next generation automated acceptance testing
Screenplay - Next generation automated acceptance testing
 
Cucumber and Spock Primer
Cucumber and Spock PrimerCucumber and Spock Primer
Cucumber and Spock Primer
 
All the world's a stage – the next step in automated testing practices
All the world's a stage – the next step in automated testing practicesAll the world's a stage – the next step in automated testing practices
All the world's a stage – the next step in automated testing practices
 
BDD-Driven Microservices
BDD-Driven MicroservicesBDD-Driven Microservices
BDD-Driven Microservices
 
BDD Anti-patterns
BDD Anti-patternsBDD Anti-patterns
BDD Anti-patterns
 
BDD in Action - Automated Web Testing with WebDriver and Serenity
BDD in Action - Automated Web Testing with WebDriver and SerenityBDD in Action - Automated Web Testing with WebDriver and Serenity
BDD in Action - Automated Web Testing with WebDriver and Serenity
 
BDD in Action - Devoxx 2014
BDD in Action - Devoxx 2014BDD in Action - Devoxx 2014
BDD in Action - Devoxx 2014
 
BDD in Action: Building Software Right and Building the Right Software
BDD in Action: Building Software Right and Building the Right SoftwareBDD in Action: Building Software Right and Building the Right Software
BDD in Action: Building Software Right and Building the Right Software
 
BDD: The unit test of the product owner
BDD: The unit test of the product ownerBDD: The unit test of the product owner
BDD: The unit test of the product owner
 
Its testing-jim-but-not-as-we-know-it-devoxx
Its testing-jim-but-not-as-we-know-it-devoxxIts testing-jim-but-not-as-we-know-it-devoxx
Its testing-jim-but-not-as-we-know-it-devoxx
 
BDD in Action - building software that matters
BDD in Action - building software that mattersBDD in Action - building software that matters
BDD in Action - building software that matters
 
BDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationBDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world application
 
TDD and BDD in Java 8 - what's in it for me?
TDD and BDD in Java 8 - what's in it for me?TDD and BDD in Java 8 - what's in it for me?
TDD and BDD in Java 8 - what's in it for me?
 
Continuous Integration 101
Continuous Integration 101Continuous Integration 101
Continuous Integration 101
 

Dernier

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 WorkerThousandEyes
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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 WorkerThousandEyes
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
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...Martijn de Jong
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
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 FresherRemote DBA Services
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 

Dernier (20)

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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

Functional testing the_good_the_bad_and_the_ugly

  • 3. Technical Agile Practices Test Driven Development Continuous Integration/Delivery Automated Acceptance Criteria Refactoring Pair Programming “Without  these  technical  prac1ces,  your  agile  adop1on  is  hollow” -­‐  Ma6  Wynne
  • 4. Technical Agile Practices Test Driven Development Continuous Integration/Delivery Automated Acceptance Criteria Refactoring Pair Programming “Without  these  technical  prac1ces,  your  agile  adop1on  is  hollow” -­‐  Ma6  Wynne
  • 5. A  good  func<onal  test  tells  a  story
  • 7. QA loses its potential if only done at the end of the project
  • 9. Living Documentation - test results that serve everyone
  • 10. So show me the tools!
  • 12. in theory in practice The Record-Replay Scam
  • 13. What do ogres and good functional tests have in common?
  • 14. (This test is not like an ogre)
  • 16. Start off with the business objectives Business-­‐level  requirements
  • 17. Describe the business flow High-­‐level  steps   (business  flow)
  • 18. Describe the page interactions Page-­‐level  interac<ons
  • 19. Page implementation details HTML  details  go  here
  • 20. Business  Rules Business  Flow Page/Component   interac<ons Page/Component   details Good automated acceptance tests have layers
  • 21. Come on - can we see the tools now?
  • 22. Unit  tes<ng  BDD  tools  (39%) Given/When/Then  (40%) Tabular  (13%)
  • 23. WebDriver / Selenium 2 Mature  browser  automa<on Wide  adop<on Cross-­‐browser  support Cross-­‐browser  support
  • 25. appium Uses  the  WebDriver  API Can  run  on  SauceLabs  (with  some  limita<ons)
  • 26. Watir Web Application Testing in Ruby browser.goto 'http://bit.ly/watir-example' browser.text_field(:name => 'entry.0.single').set 'Watir' browser.checkbox(:value => 'Ruby').set Ruby  DSL  for  web  tes<ng WebDriver-­‐based Fluent  and  readable No  na<ve  support  for   Page  Objects?
  • 27. Geb Groovy Browser Automation Browser.drive  {        go  "http://myapp.com/login"                  assert  $("h1").text()  ==  "Please  Login"                  $("form.login").with  {                username  =  "admin"                password  =  "password"                login().click()        }                  assert  $("h1").text()  ==  "Admin  Section" } Groovy  DSL  for  web  tes<ng WebDriver-­‐based Fluent  and  readable Supports  Page  Objects
  • 28. 28 High level BDD Many  tools  are  available
  • 29. 29 Narrative: In order to increase sales of advertised articles As a seller I want buyers to be able to easily find ads for articles they want to buy Scenario: Searching by keyword and location Given Sally wants to buy a puppy for her son When she looks for 'puppy' in the 'Pets and Animals' category Then she should obtain a list of ads for puppies for sale. search_by_keyword_and_location.story Business-­‐friendly  specifica<ons An  example  in  JBehave
  • 30. 30 Scenario: Searching by keyword and location Given Sally wants to buy a puppy for her son When she looks for 'puppy' in the 'Pets and Animals' category Then she should obtain a list of ads for puppies for sale. search_by_keyword_and_location.story Scenario: Searching by keyword and location Given Sally wants to buy a <present> for her son When she looks for '<present>' in the '<category>' category Then she should obtain a list of ads for <expected> for sale. Examples: |present |category |expected| |puppy |Pets & Animals | puppies| |kitten |Pets & Animals | kittens| |seiko |Jewellery & Watches| watch | Tabular  examples
  • 31. 31 Scenario: Searching by keyword and location Given Sally wants to buy a puppy for her son When she looks for 'puppy' in the 'Pets and Animals' category Then she should obtain a list of puppy ads search_by_keyword_and_location.story public class SearchAdsSteps {     @Steps     BuyerSteps buyer;     @Given("Sally wants to buy a $present for her son")     public void buyingAPresent(String present) {         buyer.opens_home_page();     }     @When("she looks for $keyword in the $category category")     public void adSearchByCategoryAndKeyword(String category, String keyword) {         buyer.chooses_category_and_keywords(category, keyword);         buyer.performs_search();     }     @Then("she should obtain a list of $keyword ads")     public void shouldOnlySeeAdsContainingKeyword(String keyword) {         buyer.should_only_see_results_with_titles_containing(keyword);     } } Step  implementa<ons  in  your   favorite  language
  • 32. 32 From web tests to living documentation
  • 34. 34 2 Automate your acceptance criteria 1 Discover your acceptance criteria 4 Execute your acceptance tests 3 Implement your acceptance criteria
  • 35. 35 1 Discover your acceptance criteria Feature: Browse Catalog In order to find items that I would like to buy As a customer I want to be able to browse through the catalog Story: Browse by category In order to find items more easily As a customer I want to be able to browse through the product categories Acceptance Criteria See all the top-level categories Browse through the category hierarchy Should display the correct products for each category Each category should have the correct sub-categories Define  acceptance  criteria  for  each  story
  • 36. 36 1 Discover your acceptance criteria Acceptance Criteria See all the top-level categories Browse through the category hierarchy Should display the correct products for each category Each category should have the correct sub-categories Scenario: See all top-level categories Given I want to browse the catalog When I am on the home page Then I should see the following product categories: Clothing, Accessories, Shoes Clarify  the  acceptance  criteria  with  examples
  • 37. 37 2 Automate your acceptance criteria Story: Browse by category In order to find items more easily As a customer I want to be able to browse through the product categories Acceptance Criteria See all the top-level categories Browse through the category hierarchy Should display the correct products for each category Each category should have the correct sub-categories Scenario: See all top-level categories Given I want to browse the catalog When I am on the home page Then I should see the following product categories: Clothing, Accessories, Shoes Narrative: In order to find items more easily As a customer I want to be able to see what product categories exist Scenario: See all top-level categories Given I want to browse the catalog When I am on the home page Then I should see the following product categories: Clothing, Accessories, Shoes We  now  have  executable  specifica<ons
  • 38. 38 2 Automate your acceptance criteria ...but  they  are  reported   as  ‘pending’
  • 39. 39 3 Implement your acceptance criteria Narrative: In order to find items more easily As a customer I want to be able to see what product categories exist Scenario: See all top-level categories Given I want to browse the catalog When I am on the home page Then I should see the following product categories: Clothing, Accessories, Shoes
  • 40. 40 4 Execute your acceptance tests What  tests  have  been  run
  • 41. 41 What  requirements   have  been  tested? 4 Execute your acceptance tests
  • 42. 42 4 Execute your acceptance tests How  did  we  show  that  a   par<cular  requirement   worked?
  • 43. 43 4 Execute your acceptance tests How  did  we  show  that  a   par<cular  requirement   worked?