SlideShare a Scribd company logo
1 of 27
Building quality on foundations of
               mud
            Kristian Rosenvold

  Selenium Committer/ Apache Maven Committer
                  Zenior AS
                Oslo,Norway

                 @krosenvold

      «from the trenches, kitten free»
Textbook solution
Production                     Test


Web      Web         Web      Web       Web         Web
 1        2           3        1         2           3




   App         App              App           App
    1           2                1             2




      Db1    Db2                      Db1   Db2
Your test environment sucks

    Hardware mismatches.
    
        2 server cluster in test, 8 in production ?

    Capability mismatches
    
        «Clustered multi-cpu oracle licence is too expensive
        to buy for test»

    Version mismatches

    Latency/bandwidth differences

    We do it «right» now, but 10 years ago....
Your test data suck

    Data does not match production
    
        «Anonymized snapshots» of production data may
        be old
    
        Products/data different in production ?
        −   Test using the products you were selling 2 years ago?

    Test back-ends in states of disarray.
        −   Subscriber has terminated his subscription in one system
            while other thinks he's still active.
        −   Only half your test-systems know the customer is
            deceased.
Fixing all those broken test
                   systems ?

    Low perceived business value

    Removes focus from business tasks
    
        no-one wants to «stop» for 3-6 months.

    Pick your fights
    
        Too expensive, won't happen
    
        Learn to live with it!
How to build quality and stay good?

    Empowered developers with full responsibility
    from specification, test to deployment

    Your team members should feel uneasy when
    the build is red.
    
        They should know their reputation/quality is on the
        line.

    Team members should know red tests mean
    trouble.
    
        False reds must be at controllable levels
Make your dev team live & breathe
            the build

    Devs build tests for all main use-cases and all
    significant error scenarios.

    Devs do all application testing by starting a test
    
        No manual testing allowed, whatsoever!
        −   Good sign; Devs do not know where the link to a specific
            feature is shown.

    All application development «driven» by
    stopping test with breakpoint; test-first

    Fully empowered devs delivering expected
    quality on time and budget key diffrentiator
What can go wrong ?

    Too slow test runs;
    
        >15 minute feedback loop too slow
        −   Significant cost increase

    «Untestable» parts of the system
    
        100% functional coverage inspires confidence; 80%
        doesnt

    Too many false red tests;
    
        10 tests that fail 5% of the time gives total ~50%
        red; totally destructive
    
        Tolerable failure rate <= 0.01% for any single test.
        −   Given 1000 tests, 1 in 10 builds can fail intermittently
Too slow tests ?

    Use grid (or SAAS)
    
        Outsource/get as much hardware as you can

    Let individual developers have access to grid
    for running tests against local workstation
CI environment
Run tests non-stop during working hours
  Build-status screens
  CI support build history down to test level
Socially acceptable to break the build
  Use «social engineering» to control scope
  Aggressive reverting of breaking changes
           •   VCS flexibility important
Broken build is priority 1
  For whoever owns the breaking committs
Untestable parts of system

    Remove impediments for testing
    
        Tests may need API's that are not regular core
        business
        −   Cancel order
        −   Aborting transactions in odd states
        −   Asynch processes

    Discard test-unfriendly technologies

    Tests «consuming test data»
    
        Consider generating test data too

    Queue based technology
Too many errors ?
Selenium bugs
  Stay close to latest version
  Fix bug, submit patch with testcase
  Work around (js simulations)
  Sacrifice speed for correctness
Test «problems»
  Instrument javascript code
  Instrument application
  0-tolerance for intermittent issues
Too many data errors ?

    Strategy 1: Lookup data by characteristics
    
        Make «TestDataLocator» that identifies data for test
        automatically:
        −   FindCustomerWithPrepaid
        −   FindCustomerWithUnpaidBills
        −   FindHighVolumeCustomer
    
        TestDataLocator can introduce randomness wrt
        what data is returned
    
        Using real (anonymized) production data
        −   Intermittent failures will reveal variations in your
            production data
             
                 Test/application should handle these variations
Too many errors (2)

    Use JUnit categories to partition tests, dividing
    into groups by stability/feature.
    
        Tagging by primary back-end system a nice
        strategy; @UsesDatabase, @UsesGeolocation,
        @UsesRemotePricingService.
        −   Any classification that makes sense from a domain
            perspective that can partition your domain.

    Instead of 1 big failing blob you now have
    
        7 groups that are «always» green, 3 that are
        troublesome
Strategy 2: Stubbing

    Replace live systems with hard-coded fakes
    
        Replace one or more external systems
        −   Increase reliability, reduce complexity
        −   Split complexity problem into parts

    «100%» confidence in some parts of stack can
    offset «holes» created by stubs.
Architecture for stubbing
                    Web pages



           «Core business logic»



Model          Integration-api




 Integration impl                  stub impl
Test data for stubs
interface DataSet {
Login getLogin();
Customer getCustomer();
Address getAddress();
List<Subscriptions> getSubscriptions();
List<Bill> getUnpaidBills();
List<Order> getMerchandiseOrders();
}
    
        Build a stub model that is sufficiently 
        complex to handle domain.
Stubs with datasets

    Logging on to a stubbed                                          Set when
    application can bind a                                           Logging in
    specific dataset to the
    session

    Stub implementations can                         ActiveDataSet
    be aware of the session
    dataset
                       Integration-api
                                                                 Session




         Integration impl                stub impl
Stubs
Public BillingStub implements BillingService{
   int i;
   public List<Bill> getBills(){
      if (i++ % 10 == 0) {
          throw new RuntimeException(«Every now 
  and then we fail»);
      }
      return getSessionDataSet().getBills();
   }
}
Stubbing antipatterns

    Keep it all at one layer

    Avoid stubs in «core» layer

    Datasets should reflect domain             Web pages



                                          «Core business logic»



                                  Model      Integration-api




                                                stub impl
Normalize stubs
interface DataSet {
Login getLogin();
Customer getCustomer();
Address getAddress();
List<Subscriptions> getSubscriptions();
List<Bill> getUnpaidBills();
List<Order> getMerchandiseOrders();
}
Coverage
                    Web pages


                                       Near 100% of core business
           «Core business logic»       logic and web layer logic



Model          Integration-api




 Integration impl                  stub impl
Coverage
                                  Web pages


                                                     Near 100% of core business
                         «Core business logic»       logic and web layer logic



              Model          Integration-api

Integration
   tests


               Integration impl                  stub impl
Live tests
                                                      Web pages


    Small set of tests
                                             «Core business logic»
    running on full live
    stack
                                                 Integration-api
    
        Smoke test the          Model

        «whole thing»

    Reduce detail
    because of general             Integration impl

    flakiness
    
        These are hard to
        maintain and amount
        of tests should be as
        low as comfortable
Coverage                        Live tests


                                  Web pages



                         «Core business logic»



              Model          Integration-api

Integration
   tests


               Integration impl                  stub impl
«Full» coverage rules

    Approximations work well !
    
        Don't be afraid of the «holes»

    Keep clear record of real defects missed due to
    approximations

    Communicate clearly where your holes are
    
        Manual test in weak areas
        −   Or maybe not, let your track record decide ?

    Your tests will outperform /any/ manual testing
    in the long run
Questions ?



   Kristian Rosenvold
kristian.rosenvold@gmail.com
      @krosenvold

More Related Content

What's hot

Load testing with vs 2013
Load testing with vs 2013Load testing with vs 2013
Load testing with vs 2013Fahad Shiekh
 
JavaLand - Integration Testing How-to
JavaLand - Integration Testing How-toJavaLand - Integration Testing How-to
JavaLand - Integration Testing How-toNicolas Fränkel
 
Unit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introUnit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introMaurice De Beijer [MVP]
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationNicolas Fränkel
 
Testing in AngularJS
Testing in AngularJSTesting in AngularJS
Testing in AngularJSPeter Drinnan
 
Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments Pavel Kaminsky
 
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSDeveloping Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSShekhar Gulati
 
IBM ConnectED 2015 - MAS103 XPages Performance and Scalability
IBM ConnectED 2015 - MAS103 XPages Performance and ScalabilityIBM ConnectED 2015 - MAS103 XPages Performance and Scalability
IBM ConnectED 2015 - MAS103 XPages Performance and ScalabilityPaul Withers
 
Automated Testing in Angular Slides
Automated Testing in Angular SlidesAutomated Testing in Angular Slides
Automated Testing in Angular SlidesJim Lynch
 
Protractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsProtractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsLudmila Nesvitiy
 
Testcontainers - Geekout EE 2017 presentation
Testcontainers - Geekout EE 2017 presentationTestcontainers - Geekout EE 2017 presentation
Testcontainers - Geekout EE 2017 presentationRichard North
 
Desktop|Embedded Application API JSR
Desktop|Embedded Application API JSRDesktop|Embedded Application API JSR
Desktop|Embedded Application API JSRAndres Almiray
 
Testing ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NETTesting ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NETBen Hall
 
Automated php unit testing in drupal 8
Automated php unit testing in drupal 8Automated php unit testing in drupal 8
Automated php unit testing in drupal 8Jay Friendly
 
Take Control of your Integration Testing with TestContainers
Take Control of your Integration Testing with TestContainersTake Control of your Integration Testing with TestContainers
Take Control of your Integration Testing with TestContainersNaresha K
 
Testing Web Applications
Testing Web ApplicationsTesting Web Applications
Testing Web ApplicationsSeth McLaughlin
 
Testing the Grails Spring Security Plugins
Testing the Grails Spring Security PluginsTesting the Grails Spring Security Plugins
Testing the Grails Spring Security PluginsBurt Beckwith
 

What's hot (20)

Load testing with vs 2013
Load testing with vs 2013Load testing with vs 2013
Load testing with vs 2013
 
JavaLand - Integration Testing How-to
JavaLand - Integration Testing How-toJavaLand - Integration Testing How-to
JavaLand - Integration Testing How-to
 
Unit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introUnit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma intro
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous Integration
 
Testing in AngularJS
Testing in AngularJSTesting in AngularJS
Testing in AngularJS
 
Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments
 
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSDeveloping Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJS
 
IBM ConnectED 2015 - MAS103 XPages Performance and Scalability
IBM ConnectED 2015 - MAS103 XPages Performance and ScalabilityIBM ConnectED 2015 - MAS103 XPages Performance and Scalability
IBM ConnectED 2015 - MAS103 XPages Performance and Scalability
 
Automated Testing in Angular Slides
Automated Testing in Angular SlidesAutomated Testing in Angular Slides
Automated Testing in Angular Slides
 
Protractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsProtractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applications
 
Testcontainers - Geekout EE 2017 presentation
Testcontainers - Geekout EE 2017 presentationTestcontainers - Geekout EE 2017 presentation
Testcontainers - Geekout EE 2017 presentation
 
Desktop|Embedded Application API JSR
Desktop|Embedded Application API JSRDesktop|Embedded Application API JSR
Desktop|Embedded Application API JSR
 
Testing ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NETTesting ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NET
 
Automated php unit testing in drupal 8
Automated php unit testing in drupal 8Automated php unit testing in drupal 8
Automated php unit testing in drupal 8
 
Take Control of your Integration Testing with TestContainers
Take Control of your Integration Testing with TestContainersTake Control of your Integration Testing with TestContainers
Take Control of your Integration Testing with TestContainers
 
Marcin Wasilczyk - Page objects with selenium
Marcin Wasilczyk - Page objects with seleniumMarcin Wasilczyk - Page objects with selenium
Marcin Wasilczyk - Page objects with selenium
 
Testing Web Applications
Testing Web ApplicationsTesting Web Applications
Testing Web Applications
 
Testing the Grails Spring Security Plugins
Testing the Grails Spring Security PluginsTesting the Grails Spring Security Plugins
Testing the Grails Spring Security Plugins
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
PHP Unit Testing
PHP Unit TestingPHP Unit Testing
PHP Unit Testing
 

Viewers also liked

Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...seleniumconf
 
Introducing Selenium Builder – the Future of Test Development
Introducing Selenium Builder – the Future of Test DevelopmentIntroducing Selenium Builder – the Future of Test Development
Introducing Selenium Builder – the Future of Test Developmentseleniumconf
 
Self-Generating Test Artifacts for Selenium/WebDriver
Self-Generating Test Artifacts for Selenium/WebDriverSelf-Generating Test Artifacts for Selenium/WebDriver
Self-Generating Test Artifacts for Selenium/WebDriverseleniumconf
 
Automatic Test Case Generation
Automatic Test Case GenerationAutomatic Test Case Generation
Automatic Test Case GenerationAdnan Causevic
 
Mud Building Workshop Aug2010 Rbr
Mud Building Workshop Aug2010 RbrMud Building Workshop Aug2010 Rbr
Mud Building Workshop Aug2010 Rbredenvardy
 
Mud in Urban Context A Study on Rammed Earth as Building Material in Dhaka City
Mud in Urban Context A Study on Rammed Earth as Building Material in Dhaka CityMud in Urban Context A Study on Rammed Earth as Building Material in Dhaka City
Mud in Urban Context A Study on Rammed Earth as Building Material in Dhaka CitySyma Haque Trisha
 
The story of language development
The story of language developmentThe story of language development
The story of language developmentHiroshi SHIBATA
 
Automated Test Case Generation and Execution from Models
Automated Test Case Generation and Execution from ModelsAutomated Test Case Generation and Execution from Models
Automated Test Case Generation and Execution from ModelsDharmalingam Ganesan
 
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case Generation
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case GenerationTMPA-2017: A Survey on Model-Based Testing Tools for Test Case Generation
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case GenerationIosif Itkin
 
Eart soil as building material
Eart soil as building materialEart soil as building material
Eart soil as building materialprathee94
 
A mud and brick structure
A mud and brick structureA mud and brick structure
A mud and brick structureManisha Tanwar
 
Thesis on earth architecture
Thesis on earth architectureThesis on earth architecture
Thesis on earth architectureBhavi Vador
 

Viewers also liked (18)

Report on mud and clay
Report on mud and clayReport on mud and clay
Report on mud and clay
 
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
 
Report on
Report onReport on
Report on
 
Introducing Selenium Builder – the Future of Test Development
Introducing Selenium Builder – the Future of Test DevelopmentIntroducing Selenium Builder – the Future of Test Development
Introducing Selenium Builder – the Future of Test Development
 
Self-Generating Test Artifacts for Selenium/WebDriver
Self-Generating Test Artifacts for Selenium/WebDriverSelf-Generating Test Artifacts for Selenium/WebDriver
Self-Generating Test Artifacts for Selenium/WebDriver
 
Automatic Test Case Generation
Automatic Test Case GenerationAutomatic Test Case Generation
Automatic Test Case Generation
 
Mud Building Workshop Aug2010 Rbr
Mud Building Workshop Aug2010 RbrMud Building Workshop Aug2010 Rbr
Mud Building Workshop Aug2010 Rbr
 
Mud in Urban Context A Study on Rammed Earth as Building Material in Dhaka City
Mud in Urban Context A Study on Rammed Earth as Building Material in Dhaka CityMud in Urban Context A Study on Rammed Earth as Building Material in Dhaka City
Mud in Urban Context A Study on Rammed Earth as Building Material in Dhaka City
 
The story of language development
The story of language developmentThe story of language development
The story of language development
 
Automated Test Case Generation and Execution from Models
Automated Test Case Generation and Execution from ModelsAutomated Test Case Generation and Execution from Models
Automated Test Case Generation and Execution from Models
 
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case Generation
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case GenerationTMPA-2017: A Survey on Model-Based Testing Tools for Test Case Generation
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case Generation
 
Eart soil as building material
Eart soil as building materialEart soil as building material
Eart soil as building material
 
[HCMC STC Jan 2015] FATS: A Framework For Automated Testing Scenarios
[HCMC STC Jan 2015] FATS: A Framework For Automated Testing Scenarios[HCMC STC Jan 2015] FATS: A Framework For Automated Testing Scenarios
[HCMC STC Jan 2015] FATS: A Framework For Automated Testing Scenarios
 
A mud and brick structure
A mud and brick structureA mud and brick structure
A mud and brick structure
 
Kp astrolgy
Kp astrolgyKp astrolgy
Kp astrolgy
 
Mudarchitecture,
Mudarchitecture,Mudarchitecture,
Mudarchitecture,
 
Thesis on earth architecture
Thesis on earth architectureThesis on earth architecture
Thesis on earth architecture
 
Report on concrete
Report on concreteReport on concrete
Report on concrete
 

Similar to Building Quality with Foundations of Mud

XML2Selenium Technical Presentation
XML2Selenium Technical PresentationXML2Selenium Technical Presentation
XML2Selenium Technical Presentationjazzteam
 
Designing for Testability - Rohit Nayak
Designing for Testability - Rohit NayakDesigning for Testability - Rohit Nayak
Designing for Testability - Rohit NayakIndicThreads
 
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...Cωνσtantίnoς Giannoulis
 
Operations: Production Readiness Review – How to stop bad things from Happening
Operations: Production Readiness Review – How to stop bad things from HappeningOperations: Production Readiness Review – How to stop bad things from Happening
Operations: Production Readiness Review – How to stop bad things from HappeningAmazon Web Services
 
Operations: Production Readiness
Operations: Production ReadinessOperations: Production Readiness
Operations: Production ReadinessAmazon Web Services
 
Best practice adoption (and lack there of)
Best practice adoption (and lack there of)Best practice adoption (and lack there of)
Best practice adoption (and lack there of)John Pape
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaAmazon Web Services
 
ServerTemplate Deep Dive
ServerTemplate Deep DiveServerTemplate Deep Dive
ServerTemplate Deep DiveRightScale
 
Start Up Austin 2017: Production Preview - How to Stop Bad Things From Happening
Start Up Austin 2017: Production Preview - How to Stop Bad Things From HappeningStart Up Austin 2017: Production Preview - How to Stop Bad Things From Happening
Start Up Austin 2017: Production Preview - How to Stop Bad Things From HappeningAmazon Web Services
 
Sync Workitems between multiple Team Projects #vssatpn
Sync Workitems between multiple Team Projects #vssatpnSync Workitems between multiple Team Projects #vssatpn
Sync Workitems between multiple Team Projects #vssatpnLorenzo Barbieri
 
SVCC 2011 - 0 - 60: QA Automation @ Box
SVCC 2011 - 0 - 60: QA Automation @ BoxSVCC 2011 - 0 - 60: QA Automation @ Box
SVCC 2011 - 0 - 60: QA Automation @ BoxPeter White
 
Java ee7 with apache spark for the world's largest credit card core systems, ...
Java ee7 with apache spark for the world's largest credit card core systems, ...Java ee7 with apache spark for the world's largest credit card core systems, ...
Java ee7 with apache spark for the world's largest credit card core systems, ...Rakuten Group, Inc.
 
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)CIVEL Benoit
 
Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1CIVEL Benoit
 
DevOps in Practice: When does "Practice" Become "Doing"?
DevOps in Practice: When does "Practice" Become "Doing"?DevOps in Practice: When does "Practice" Become "Doing"?
DevOps in Practice: When does "Practice" Become "Doing"?Michael Elder
 
Lulla Amit - Resume updated
Lulla Amit - Resume updatedLulla Amit - Resume updated
Lulla Amit - Resume updatedAmit Lulla
 
Centralized test automation framework implementation
Centralized test automation framework implementationCentralized test automation framework implementation
Centralized test automation framework implementationBharathi Krishnamurthi
 
Jimwebber soa
Jimwebber soaJimwebber soa
Jimwebber soad0nn9n
 

Similar to Building Quality with Foundations of Mud (20)

XML2Selenium Technical Presentation
XML2Selenium Technical PresentationXML2Selenium Technical Presentation
XML2Selenium Technical Presentation
 
Designing for Testability - Rohit Nayak
Designing for Testability - Rohit NayakDesigning for Testability - Rohit Nayak
Designing for Testability - Rohit Nayak
 
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
 
Operations: Production Readiness Review – How to stop bad things from Happening
Operations: Production Readiness Review – How to stop bad things from HappeningOperations: Production Readiness Review – How to stop bad things from Happening
Operations: Production Readiness Review – How to stop bad things from Happening
 
Operations: Production Readiness
Operations: Production ReadinessOperations: Production Readiness
Operations: Production Readiness
 
Best practice adoption (and lack there of)
Best practice adoption (and lack there of)Best practice adoption (and lack there of)
Best practice adoption (and lack there of)
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
 
Testing
TestingTesting
Testing
 
ServerTemplate Deep Dive
ServerTemplate Deep DiveServerTemplate Deep Dive
ServerTemplate Deep Dive
 
Start Up Austin 2017: Production Preview - How to Stop Bad Things From Happening
Start Up Austin 2017: Production Preview - How to Stop Bad Things From HappeningStart Up Austin 2017: Production Preview - How to Stop Bad Things From Happening
Start Up Austin 2017: Production Preview - How to Stop Bad Things From Happening
 
Sync Workitems between multiple Team Projects #vssatpn
Sync Workitems between multiple Team Projects #vssatpnSync Workitems between multiple Team Projects #vssatpn
Sync Workitems between multiple Team Projects #vssatpn
 
SVCC 2011 - 0 - 60: QA Automation @ Box
SVCC 2011 - 0 - 60: QA Automation @ BoxSVCC 2011 - 0 - 60: QA Automation @ Box
SVCC 2011 - 0 - 60: QA Automation @ Box
 
Java ee7 with apache spark for the world's largest credit card core systems, ...
Java ee7 with apache spark for the world's largest credit card core systems, ...Java ee7 with apache spark for the world's largest credit card core systems, ...
Java ee7 with apache spark for the world's largest credit card core systems, ...
 
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
 
Agility for Data
Agility for DataAgility for Data
Agility for Data
 
DevOps in Practice: When does "Practice" Become "Doing"?
DevOps in Practice: When does "Practice" Become "Doing"?DevOps in Practice: When does "Practice" Become "Doing"?
DevOps in Practice: When does "Practice" Become "Doing"?
 
Lulla Amit - Resume updated
Lulla Amit - Resume updatedLulla Amit - Resume updated
Lulla Amit - Resume updated
 
Centralized test automation framework implementation
Centralized test automation framework implementationCentralized test automation framework implementation
Centralized test automation framework implementation
 
Jimwebber soa
Jimwebber soaJimwebber soa
Jimwebber soa
 

More from seleniumconf

More Than Automation - How Good Acceptance Tests Can Make Your Team Happier
More Than Automation - How Good Acceptance Tests Can Make Your Team HappierMore Than Automation - How Good Acceptance Tests Can Make Your Team Happier
More Than Automation - How Good Acceptance Tests Can Make Your Team Happierseleniumconf
 
Building a Selenium Community One Meetup at a Time
Building a Selenium Community One Meetup at a TimeBuilding a Selenium Community One Meetup at a Time
Building a Selenium Community One Meetup at a Timeseleniumconf
 
Introduction to selenium_grid_workshop
Introduction to selenium_grid_workshopIntroduction to selenium_grid_workshop
Introduction to selenium_grid_workshopseleniumconf
 
Automated Security Testing
Automated Security TestingAutomated Security Testing
Automated Security Testingseleniumconf
 
Selenium: State of the Union
Selenium: State of the UnionSelenium: State of the Union
Selenium: State of the Unionseleniumconf
 
Automated Web App Performance Testing Using WebDriver
Automated Web App Performance Testing Using WebDriverAutomated Web App Performance Testing Using WebDriver
Automated Web App Performance Testing Using WebDriverseleniumconf
 
Building a Driver: Lessons Learned From Developing the Internet Explorer Driver
Building a Driver: Lessons Learned From Developing the Internet Explorer DriverBuilding a Driver: Lessons Learned From Developing the Internet Explorer Driver
Building a Driver: Lessons Learned From Developing the Internet Explorer Driverseleniumconf
 
Massively Continuous Integration: From 3 days to 30 minutes
Massively Continuous Integration: From 3 days to 30 minutesMassively Continuous Integration: From 3 days to 30 minutes
Massively Continuous Integration: From 3 days to 30 minutesseleniumconf
 

More from seleniumconf (8)

More Than Automation - How Good Acceptance Tests Can Make Your Team Happier
More Than Automation - How Good Acceptance Tests Can Make Your Team HappierMore Than Automation - How Good Acceptance Tests Can Make Your Team Happier
More Than Automation - How Good Acceptance Tests Can Make Your Team Happier
 
Building a Selenium Community One Meetup at a Time
Building a Selenium Community One Meetup at a TimeBuilding a Selenium Community One Meetup at a Time
Building a Selenium Community One Meetup at a Time
 
Introduction to selenium_grid_workshop
Introduction to selenium_grid_workshopIntroduction to selenium_grid_workshop
Introduction to selenium_grid_workshop
 
Automated Security Testing
Automated Security TestingAutomated Security Testing
Automated Security Testing
 
Selenium: State of the Union
Selenium: State of the UnionSelenium: State of the Union
Selenium: State of the Union
 
Automated Web App Performance Testing Using WebDriver
Automated Web App Performance Testing Using WebDriverAutomated Web App Performance Testing Using WebDriver
Automated Web App Performance Testing Using WebDriver
 
Building a Driver: Lessons Learned From Developing the Internet Explorer Driver
Building a Driver: Lessons Learned From Developing the Internet Explorer DriverBuilding a Driver: Lessons Learned From Developing the Internet Explorer Driver
Building a Driver: Lessons Learned From Developing the Internet Explorer Driver
 
Massively Continuous Integration: From 3 days to 30 minutes
Massively Continuous Integration: From 3 days to 30 minutesMassively Continuous Integration: From 3 days to 30 minutes
Massively Continuous Integration: From 3 days to 30 minutes
 

Recently uploaded

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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
 
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
 
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 FMESafe Software
 
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 SavingEdi Saputra
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
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 educationjfdjdjcjdnsjd
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
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, ...apidays
 

Recently uploaded (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
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
 
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
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
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?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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, ...
 

Building Quality with Foundations of Mud

  • 1. Building quality on foundations of mud Kristian Rosenvold Selenium Committer/ Apache Maven Committer Zenior AS Oslo,Norway @krosenvold «from the trenches, kitten free»
  • 2. Textbook solution Production Test Web Web Web Web Web Web 1 2 3 1 2 3 App App App App 1 2 1 2 Db1 Db2 Db1 Db2
  • 3. Your test environment sucks  Hardware mismatches.  2 server cluster in test, 8 in production ?  Capability mismatches  «Clustered multi-cpu oracle licence is too expensive to buy for test»  Version mismatches  Latency/bandwidth differences  We do it «right» now, but 10 years ago....
  • 4. Your test data suck  Data does not match production  «Anonymized snapshots» of production data may be old  Products/data different in production ? − Test using the products you were selling 2 years ago?  Test back-ends in states of disarray. − Subscriber has terminated his subscription in one system while other thinks he's still active. − Only half your test-systems know the customer is deceased.
  • 5. Fixing all those broken test systems ?  Low perceived business value  Removes focus from business tasks  no-one wants to «stop» for 3-6 months.  Pick your fights  Too expensive, won't happen  Learn to live with it!
  • 6. How to build quality and stay good?  Empowered developers with full responsibility from specification, test to deployment  Your team members should feel uneasy when the build is red.  They should know their reputation/quality is on the line.  Team members should know red tests mean trouble.  False reds must be at controllable levels
  • 7. Make your dev team live & breathe the build  Devs build tests for all main use-cases and all significant error scenarios.  Devs do all application testing by starting a test  No manual testing allowed, whatsoever! − Good sign; Devs do not know where the link to a specific feature is shown.  All application development «driven» by stopping test with breakpoint; test-first  Fully empowered devs delivering expected quality on time and budget key diffrentiator
  • 8. What can go wrong ?  Too slow test runs;  >15 minute feedback loop too slow − Significant cost increase  «Untestable» parts of the system  100% functional coverage inspires confidence; 80% doesnt  Too many false red tests;  10 tests that fail 5% of the time gives total ~50% red; totally destructive  Tolerable failure rate <= 0.01% for any single test. − Given 1000 tests, 1 in 10 builds can fail intermittently
  • 9. Too slow tests ?  Use grid (or SAAS)  Outsource/get as much hardware as you can  Let individual developers have access to grid for running tests against local workstation
  • 10. CI environment Run tests non-stop during working hours Build-status screens CI support build history down to test level Socially acceptable to break the build Use «social engineering» to control scope Aggressive reverting of breaking changes • VCS flexibility important Broken build is priority 1 For whoever owns the breaking committs
  • 11. Untestable parts of system  Remove impediments for testing  Tests may need API's that are not regular core business − Cancel order − Aborting transactions in odd states − Asynch processes  Discard test-unfriendly technologies  Tests «consuming test data»  Consider generating test data too  Queue based technology
  • 12. Too many errors ? Selenium bugs Stay close to latest version Fix bug, submit patch with testcase Work around (js simulations) Sacrifice speed for correctness Test «problems» Instrument javascript code Instrument application 0-tolerance for intermittent issues
  • 13. Too many data errors ?  Strategy 1: Lookup data by characteristics  Make «TestDataLocator» that identifies data for test automatically: − FindCustomerWithPrepaid − FindCustomerWithUnpaidBills − FindHighVolumeCustomer  TestDataLocator can introduce randomness wrt what data is returned  Using real (anonymized) production data − Intermittent failures will reveal variations in your production data  Test/application should handle these variations
  • 14. Too many errors (2)  Use JUnit categories to partition tests, dividing into groups by stability/feature.  Tagging by primary back-end system a nice strategy; @UsesDatabase, @UsesGeolocation, @UsesRemotePricingService. − Any classification that makes sense from a domain perspective that can partition your domain.  Instead of 1 big failing blob you now have  7 groups that are «always» green, 3 that are troublesome
  • 15. Strategy 2: Stubbing  Replace live systems with hard-coded fakes  Replace one or more external systems − Increase reliability, reduce complexity − Split complexity problem into parts  «100%» confidence in some parts of stack can offset «holes» created by stubs.
  • 16. Architecture for stubbing Web pages «Core business logic» Model Integration-api Integration impl stub impl
  • 17. Test data for stubs interface DataSet { Login getLogin(); Customer getCustomer(); Address getAddress(); List<Subscriptions> getSubscriptions(); List<Bill> getUnpaidBills(); List<Order> getMerchandiseOrders(); }  Build a stub model that is sufficiently  complex to handle domain.
  • 18. Stubs with datasets  Logging on to a stubbed Set when application can bind a Logging in specific dataset to the session  Stub implementations can ActiveDataSet be aware of the session dataset Integration-api Session Integration impl stub impl
  • 20. Stubbing antipatterns  Keep it all at one layer  Avoid stubs in «core» layer  Datasets should reflect domain Web pages «Core business logic» Model Integration-api stub impl
  • 22. Coverage Web pages Near 100% of core business «Core business logic» logic and web layer logic Model Integration-api Integration impl stub impl
  • 23. Coverage Web pages Near 100% of core business «Core business logic» logic and web layer logic Model Integration-api Integration tests Integration impl stub impl
  • 24. Live tests Web pages  Small set of tests «Core business logic» running on full live stack Integration-api  Smoke test the Model «whole thing»  Reduce detail because of general Integration impl flakiness  These are hard to maintain and amount of tests should be as low as comfortable
  • 25. Coverage Live tests Web pages «Core business logic» Model Integration-api Integration tests Integration impl stub impl
  • 26. «Full» coverage rules  Approximations work well !  Don't be afraid of the «holes»  Keep clear record of real defects missed due to approximations  Communicate clearly where your holes are  Manual test in weak areas − Or maybe not, let your track record decide ?  Your tests will outperform /any/ manual testing in the long run
  • 27. Questions ? Kristian Rosenvold kristian.rosenvold@gmail.com @krosenvold