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 à Automated Functional Testing Guide

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 à Automated Functional Testing Guide (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

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Dernier (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

Automated Functional Testing Guide

  • 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?