SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
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
 
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
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
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
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
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
 
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
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 

Kürzlich hochgeladen (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
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
 
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.
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
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
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
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
 
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
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 

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