SlideShare une entreprise Scribd logo
1  sur  41
Testability: Factors and Strategy Robert V. Binder rvbinder@gmail.com Google Test Automation Conference  Hyderabad  October 28, 2010 1  © 2010, Robert V. Binder
Overview Why testability matters White box testability Black box testability Test automation Strategy Q&A 2
Why Testability Matters 3
Testability Economics Assumptions Sooner is better Escapes are bad Fewer tests means more escapes Fixed budget – how to optimize Efficiency: average tests per unit of effort Effectiveness: average probability of killing a bug per unit of effort Higher testability: more better tests, same cost Lower testability:  fewer weaker tests, same cost  Testability defines the limits on producing complex systems with an acceptable risk of costly or dangerous defects. 4
What Makes an SUT Testable? Controllability What do we have to do to run a test case? How hard (expensive) is it to do this? Does the SUT make it impractical to run some kinds of tests ?  Given a testing goal, do we know enough to produce an adequate test suite? How much tooling can we afford? Observability What do we have to do to determine test pass/fail? How hard (expensive) is it to do this? Does the SUT make it impractical to fully determine test results ? Do we know enough to decide pass/fail/DNF ? 5
Testability Factors 6
Testability Factors 7
Examples 8
White BOX Testability 9
White Box Testability 10
The Anatomy of a Successful Test To reveal a bug, a test must Reach the buggy code Trigger the bug Propagate the incorrect result Incorrect result must be observed The incorrect result must be recognized as such int scale(int j) { 	j = j - 1;	 	j = j/30000; 	return j; } // should be j = j + 1 Out of  65,536 possible values for j, only six will produce an incorrect result:  -30001, -30000, -1, 0, 29999, and  30000.  11
What Diminishes Testability? Non-deterministic Dependencies Race conditions Message latency Threading CRUD shared and unprotected data 12
What Diminishes Testability? Complexity Essential Accidental 13
What Improves Testability? Points of Control and Observation (PCOs) State test helpers Built-in Test Well-structured code 15
PCOs Point of Control or Observation Abstraction of any kind of interface See TTCN-3 for a complete discussion What does a tester/test harness have to do activate SUT components and aspects?  Components easier Aspects more interesting, but typically not directly controllable What does a tester/test harness have to do inspect SUT state or traces to evaluate a test?  Traces easier, but often not sufficient or noisy Embedded state observers effective, but expensive or polluting  Aspects often critical, but typically not directly observable Design for testability:  Determine requirements for aspect-oriented PCOs 16
State Test Helpers Set state  Get current state Logical State Invariant Functions (LSIFs) Reset All actions controllable All events observable 17
Implementation and Test Models 18
Test Plan and Test Size K events N states With LSIFs KN tests No LSIFs K × N3 tests 19
Built-in Test Asserts Logging Design by Contract No Code Left Behind pattern Percolation pattern 20
No Code Left Behind  Forces How to have extensive BIT without code bloat? How to have consistent, controllable Logging Frequency of evaluation Options for handling detection Define once, reuse globally? Solution Dev adds Invariant function to each class Invariant calls InvariantCheck evaluates necessary state InvariantCheck function with global settings Selective run time evaluation  constand inline idiom for no object code in production 21
Percolation Pattern Enforces LiskovSubsitutability Implement with No Code Left Behind 22
Well-structured Code Many well-established principles Significant for Testability No cyclic dependencies Don’t allow build dependencies to leak over structural and functional boundaries (levelization) Partition classes and packages to minimize interface complexity 23
Black Box Testability 24
Black Box Testability 25
System Size How big is the essential system? Feature points Use cases Singly invocable menu items Command/sub commands Computational strategy Transaction processing Simulation Video games Storage Number of tables/views 26
Network Extent How many independent nodes? Client/server Tiers Peer to peer Minimum Spanning Tree Must have one at least of each online MS-TPSO, Transaction Processing System Overview 27
Variants How many configuration options? How many platforms supported? How many localization variants How many “editions”?  Combinational coverage Try each option with every other at least once (pair-wise) Pair-wise worst case product of option sizes May be reduced with good tools 28
Weather – Environmental The SUT has elements that cannot be practically established in the lab Cellular base station Expensive server farm Competitor/aggressor capabilities Internet – you can never step in the same river twice Test environment not feasible Must use production/field system for test  Cannot stress production/field system 29
More is Less Other things being equal, a larger system is less testable Same budget spread thinner Reducing system scope improves testability Try to partition into independent subsystems: additive versus multiplicative extent of test suite For example 10000 Feature Points 6 Network Node types 20 options, five variables each Must test when financial markets are open  How big is that? 30
M66 95000 Light Years 1 Pixel ≈ 400 Light Years Solar System ≈ 0.0025 LY
Understanding Improves Testability Primary source of system knowledge Documented, validated? Intuited, guessed? IEEE 830 Test Model Different strokes Test-ready or hints? Oracle Computable or judgment? Indeterminate? 32
Test Automation 33
Automation Improves Testability  Bigger systems need many more tests Intellectual leverage Huge coverage space Repeatable Scale up functional suites for load test What kind of automation? Harness Developer harness System harness Capture-replay Model-based Generation Evaluation 34
Test Automation Envelope 35 Model- Based Vision Bespoke Model-Based 5 Nines 4 Nines 3 Nines 2 Nines 1 Nine Manual 1 10 100 1,000 10,000 Scripting Reliability (Effectiveness) Productivity: Tests/Hour (Efficiency)
Strategy 36
minimize maximize How to Improve Testability? minimize maximize WBT =   BIT + State Helpers +PCOs   - Structure -  Complexity– NDDs BBT =   Model + Oracle + Harness    – Size – Nodes – Variants - Weather 37
Who Owns Testability Drivers? Testers typically don’t own or control the work that drives testability 38
Strategy Emphasize Functional Testing Incentivize Repeaters High Black Box Testability Emphasize Code Coverage Manage Expectations Low Low High White Box Testability 39
Q & A 40
Media Credits Robert V. Binder. Design for testability in object-oriented systems. Communications of the ACM, Sept 1994.  Diomidis D. Spinellis. Internet Explorer Call Tree. Unknown. Dancing Hamsters. Jackson Pollock, Autumn Rhythms. Brian Ferneyhough. Plötzlichkeitfor Large Orchestra. Robert V. Binder. Testing Object-Oriented Systems: Models, Patterns, and Tools. Microsoft, MS-TPSO, Transaction Processing System Overview. NASA, Hubble Space Telescope, M66 Galaxy. Holst - The Planets – Uranus. Peabody Concert Orchestra,Hajime Teri Murai, Music Director Test Automation Envelope.  mVerify Corporation. 41

Contenu connexe

Tendances

Software engineering 23 software reliability
Software engineering 23 software reliabilitySoftware engineering 23 software reliability
Software engineering 23 software reliabilityVaibhav Khanna
 
An Introduction to Performance Testing
An Introduction to Performance TestingAn Introduction to Performance Testing
An Introduction to Performance TestingDavid Tzemach
 
Seven testing principles
Seven testing principlesSeven testing principles
Seven testing principlesVaibhav Dash
 
Software reliability & quality
Software reliability & qualitySoftware reliability & quality
Software reliability & qualityNur Islam
 
What is component testing | David Tzemach
What is component testing | David TzemachWhat is component testing | David Tzemach
What is component testing | David TzemachDavid Tzemach
 
Short definitions of all testing types
Short definitions of all testing typesShort definitions of all testing types
Short definitions of all testing typesGaruda Trainings
 
The Art of Testing Less without Sacrificing Quality @ ICSE 2015
The Art of Testing Less without Sacrificing Quality @ ICSE 2015The Art of Testing Less without Sacrificing Quality @ ICSE 2015
The Art of Testing Less without Sacrificing Quality @ ICSE 2015Kim Herzig
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4 Mohammad Faizan
 
Fundamental of testing (what is testing)
Fundamental of testing (what is testing)Fundamental of testing (what is testing)
Fundamental of testing (what is testing)helfa safitri
 
Regression and performance testing
Regression and performance testingRegression and performance testing
Regression and performance testingHimanshu
 
Software reliability tools and common software errors
Software reliability tools and common software errorsSoftware reliability tools and common software errors
Software reliability tools and common software errorsHimanshu
 
fundamentals of testing (Fundamental of testing what)
fundamentals of testing (Fundamental of testing what)fundamentals of testing (Fundamental of testing what)
fundamentals of testing (Fundamental of testing what)diana fitri, S.Kom
 
Empirically Detecting False Test Alarms Using Association Rules @ ICSE 2015
Empirically Detecting False Test Alarms Using Association Rules @ ICSE 2015Empirically Detecting False Test Alarms Using Association Rules @ ICSE 2015
Empirically Detecting False Test Alarms Using Association Rules @ ICSE 2015Kim Herzig
 
Fundamentals of testing what is testing (reference graham et.al (2006))
Fundamentals of testing   what is testing (reference graham et.al (2006))Fundamentals of testing   what is testing (reference graham et.al (2006))
Fundamentals of testing what is testing (reference graham et.al (2006))Alfarizi ,S.Kom
 
Fundamentals of testing 2
Fundamentals of testing 2Fundamentals of testing 2
Fundamentals of testing 2seli purnianda
 

Tendances (20)

Principles of software testing
Principles of software testingPrinciples of software testing
Principles of software testing
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Software engineering 23 software reliability
Software engineering 23 software reliabilitySoftware engineering 23 software reliability
Software engineering 23 software reliability
 
Quality & Reliability in Software Engineering
Quality & Reliability in Software EngineeringQuality & Reliability in Software Engineering
Quality & Reliability in Software Engineering
 
7 testing principles
7 testing principles7 testing principles
7 testing principles
 
An Introduction to Performance Testing
An Introduction to Performance TestingAn Introduction to Performance Testing
An Introduction to Performance Testing
 
Seven testing principles
Seven testing principlesSeven testing principles
Seven testing principles
 
Software reliability & quality
Software reliability & qualitySoftware reliability & quality
Software reliability & quality
 
What is component testing | David Tzemach
What is component testing | David TzemachWhat is component testing | David Tzemach
What is component testing | David Tzemach
 
Short definitions of all testing types
Short definitions of all testing typesShort definitions of all testing types
Short definitions of all testing types
 
The Art of Testing Less without Sacrificing Quality @ ICSE 2015
The Art of Testing Less without Sacrificing Quality @ ICSE 2015The Art of Testing Less without Sacrificing Quality @ ICSE 2015
The Art of Testing Less without Sacrificing Quality @ ICSE 2015
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4
 
Fundamental of testing (what is testing)
Fundamental of testing (what is testing)Fundamental of testing (what is testing)
Fundamental of testing (what is testing)
 
Regression and performance testing
Regression and performance testingRegression and performance testing
Regression and performance testing
 
Software reliability tools and common software errors
Software reliability tools and common software errorsSoftware reliability tools and common software errors
Software reliability tools and common software errors
 
Testing Principles
Testing PrinciplesTesting Principles
Testing Principles
 
fundamentals of testing (Fundamental of testing what)
fundamentals of testing (Fundamental of testing what)fundamentals of testing (Fundamental of testing what)
fundamentals of testing (Fundamental of testing what)
 
Empirically Detecting False Test Alarms Using Association Rules @ ICSE 2015
Empirically Detecting False Test Alarms Using Association Rules @ ICSE 2015Empirically Detecting False Test Alarms Using Association Rules @ ICSE 2015
Empirically Detecting False Test Alarms Using Association Rules @ ICSE 2015
 
Fundamentals of testing what is testing (reference graham et.al (2006))
Fundamentals of testing   what is testing (reference graham et.al (2006))Fundamentals of testing   what is testing (reference graham et.al (2006))
Fundamentals of testing what is testing (reference graham et.al (2006))
 
Fundamentals of testing 2
Fundamentals of testing 2Fundamentals of testing 2
Fundamentals of testing 2
 

Similaire à Testability: Factors and Strategy

Automated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra SolutionsAutomated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra SolutionsQuontra Solutions
 
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...TEST Huddle
 
Effective Test Suites for ! Mixed Discrete-Continuous Stateflow Controllers
Effective Test Suites for ! Mixed Discrete-Continuous Stateflow ControllersEffective Test Suites for ! Mixed Discrete-Continuous Stateflow Controllers
Effective Test Suites for ! Mixed Discrete-Continuous Stateflow ControllersLionel Briand
 
Software testing
Software testingSoftware testing
Software testingBala Ganesh
 
Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010
Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010
Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010TEST Huddle
 
Combinatorial testing
Combinatorial testingCombinatorial testing
Combinatorial testingKedar Kumar
 
Keynote AST 2016
Keynote AST 2016Keynote AST 2016
Keynote AST 2016Kim Herzig
 
Combinatorial testing ppt
Combinatorial testing pptCombinatorial testing ppt
Combinatorial testing pptKedar Kumar
 
Softwar tetesting basic
Softwar tetesting basicSoftwar tetesting basic
Softwar tetesting basicparekhjigarh
 
cupdf.com_chapter-11-system-level-verification-issues-the-importance-of-verif...
cupdf.com_chapter-11-system-level-verification-issues-the-importance-of-verif...cupdf.com_chapter-11-system-level-verification-issues-the-importance-of-verif...
cupdf.com_chapter-11-system-level-verification-issues-the-importance-of-verif...SamHoney6
 
Guidelines to Measuring Test Automation ROI
 Guidelines to Measuring Test Automation ROI Guidelines to Measuring Test Automation ROI
Guidelines to Measuring Test Automation ROIPerfecto by Perforce
 
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012TEST Huddle
 
Testing fundamentals in a changing world
Testing fundamentals in a changing worldTesting fundamentals in a changing world
Testing fundamentals in a changing worldPractiTest
 
Effective Testing Practices in an Agile Environment
Effective Testing Practices in an Agile EnvironmentEffective Testing Practices in an Agile Environment
Effective Testing Practices in an Agile EnvironmentRaj Indugula
 
Continuous delivery test strategies
Continuous delivery test strategiesContinuous delivery test strategies
Continuous delivery test strategiesHylke Stapersma
 

Similaire à Testability: Factors and Strategy (20)

Automated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra SolutionsAutomated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra Solutions
 
Unit testing
Unit testingUnit testing
Unit testing
 
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
 
Testing
TestingTesting
Testing
 
Effective Test Suites for ! Mixed Discrete-Continuous Stateflow Controllers
Effective Test Suites for ! Mixed Discrete-Continuous Stateflow ControllersEffective Test Suites for ! Mixed Discrete-Continuous Stateflow Controllers
Effective Test Suites for ! Mixed Discrete-Continuous Stateflow Controllers
 
Software testing
Software testingSoftware testing
Software testing
 
Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010
Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010
Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010
 
Test Levels & Techniques
Test Levels & TechniquesTest Levels & Techniques
Test Levels & Techniques
 
Combinatorial testing
Combinatorial testingCombinatorial testing
Combinatorial testing
 
Keynote AST 2016
Keynote AST 2016Keynote AST 2016
Keynote AST 2016
 
Combinatorial testing ppt
Combinatorial testing pptCombinatorial testing ppt
Combinatorial testing ppt
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
 
Softwar tetesting basic
Softwar tetesting basicSoftwar tetesting basic
Softwar tetesting basic
 
cupdf.com_chapter-11-system-level-verification-issues-the-importance-of-verif...
cupdf.com_chapter-11-system-level-verification-issues-the-importance-of-verif...cupdf.com_chapter-11-system-level-verification-issues-the-importance-of-verif...
cupdf.com_chapter-11-system-level-verification-issues-the-importance-of-verif...
 
Guidelines to Measuring Test Automation ROI
 Guidelines to Measuring Test Automation ROI Guidelines to Measuring Test Automation ROI
Guidelines to Measuring Test Automation ROI
 
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
 
Vlsi testing
Vlsi testingVlsi testing
Vlsi testing
 
Testing fundamentals in a changing world
Testing fundamentals in a changing worldTesting fundamentals in a changing world
Testing fundamentals in a changing world
 
Effective Testing Practices in an Agile Environment
Effective Testing Practices in an Agile EnvironmentEffective Testing Practices in an Agile Environment
Effective Testing Practices in an Agile Environment
 
Continuous delivery test strategies
Continuous delivery test strategiesContinuous delivery test strategies
Continuous delivery test strategies
 

Plus de Bob Binder

How to Release Rock-solid RESTful APIs and Ice the Testing BackBlob
How to Release Rock-solid RESTful APIs and Ice the Testing BackBlobHow to Release Rock-solid RESTful APIs and Ice the Testing BackBlob
How to Release Rock-solid RESTful APIs and Ice the Testing BackBlobBob Binder
 
Lessons learned validating 60,000 pages of api documentation
Lessons learned validating 60,000 pages of api documentationLessons learned validating 60,000 pages of api documentation
Lessons learned validating 60,000 pages of api documentationBob Binder
 
Model-based Testing: Taking BDD/ATDD to the Next Level
Model-based Testing: Taking BDD/ATDD to the Next LevelModel-based Testing: Taking BDD/ATDD to the Next Level
Model-based Testing: Taking BDD/ATDD to the Next LevelBob Binder
 
Model-based Testing: Today And Tomorrow
Model-based Testing: Today And TomorrowModel-based Testing: Today And Tomorrow
Model-based Testing: Today And TomorrowBob Binder
 
Mobile App Assurance: Yesterday, Today, and Tomorrow.
Mobile App Assurance: Yesterday, Today, and Tomorrow.Mobile App Assurance: Yesterday, Today, and Tomorrow.
Mobile App Assurance: Yesterday, Today, and Tomorrow.Bob Binder
 
Popular Delusions, Crowds, and the Coming Deluge: end of the Oracle?
Popular Delusions, Crowds, and the Coming Deluge: end of the Oracle?Popular Delusions, Crowds, and the Coming Deluge: end of the Oracle?
Popular Delusions, Crowds, and the Coming Deluge: end of the Oracle?Bob Binder
 
MTS: Controllable Test Objects
MTS: Controllable Test ObjectsMTS: Controllable Test Objects
MTS: Controllable Test ObjectsBob Binder
 
Achieving Very High Reliability for Ubiquitous Information Technology
Achieving Very High Reliability for Ubiquitous Information Technology Achieving Very High Reliability for Ubiquitous Information Technology
Achieving Very High Reliability for Ubiquitous Information Technology Bob Binder
 
The Tester’s Dashboard: Release Decision Support
The Tester’s Dashboard: Release Decision SupportThe Tester’s Dashboard: Release Decision Support
The Tester’s Dashboard: Release Decision SupportBob Binder
 
Performance Testing Mobile and Multi-Tier Applications
Performance Testing Mobile and Multi-Tier ApplicationsPerformance Testing Mobile and Multi-Tier Applications
Performance Testing Mobile and Multi-Tier ApplicationsBob Binder
 
Testing Object-Oriented Systems: Lessons Learned
Testing Object-Oriented Systems: Lessons LearnedTesting Object-Oriented Systems: Lessons Learned
Testing Object-Oriented Systems: Lessons LearnedBob Binder
 
mVerify Investor Overview
mVerify Investor OverviewmVerify Investor Overview
mVerify Investor OverviewBob Binder
 
Model-Based Testing: Why, What, How
Model-Based Testing: Why, What, HowModel-Based Testing: Why, What, How
Model-Based Testing: Why, What, HowBob Binder
 
MDD and the Tautology Problem: Discussion Notes.
MDD and the Tautology Problem: Discussion Notes.MDD and the Tautology Problem: Discussion Notes.
MDD and the Tautology Problem: Discussion Notes.Bob Binder
 
Mobile Reliability Challenges
Mobile Reliability ChallengesMobile Reliability Challenges
Mobile Reliability ChallengesBob Binder
 
Experience with a Profile-based Automated Testing Environment
Experience with a Profile-based Automated Testing EnvironmentExperience with a Profile-based Automated Testing Environment
Experience with a Profile-based Automated Testing EnvironmentBob Binder
 
Testability: Factors and Strategy
Testability: Factors and StrategyTestability: Factors and Strategy
Testability: Factors and StrategyBob Binder
 
Test Objects -- They Just Work
Test Objects -- They Just WorkTest Objects -- They Just Work
Test Objects -- They Just WorkBob Binder
 
A Million Users in a Box: The WTS Story
A Million Users in a Box: The WTS StoryA Million Users in a Box: The WTS Story
A Million Users in a Box: The WTS StoryBob Binder
 
ISSRE 2008 Trip Report
ISSRE 2008 Trip ReportISSRE 2008 Trip Report
ISSRE 2008 Trip ReportBob Binder
 

Plus de Bob Binder (20)

How to Release Rock-solid RESTful APIs and Ice the Testing BackBlob
How to Release Rock-solid RESTful APIs and Ice the Testing BackBlobHow to Release Rock-solid RESTful APIs and Ice the Testing BackBlob
How to Release Rock-solid RESTful APIs and Ice the Testing BackBlob
 
Lessons learned validating 60,000 pages of api documentation
Lessons learned validating 60,000 pages of api documentationLessons learned validating 60,000 pages of api documentation
Lessons learned validating 60,000 pages of api documentation
 
Model-based Testing: Taking BDD/ATDD to the Next Level
Model-based Testing: Taking BDD/ATDD to the Next LevelModel-based Testing: Taking BDD/ATDD to the Next Level
Model-based Testing: Taking BDD/ATDD to the Next Level
 
Model-based Testing: Today And Tomorrow
Model-based Testing: Today And TomorrowModel-based Testing: Today And Tomorrow
Model-based Testing: Today And Tomorrow
 
Mobile App Assurance: Yesterday, Today, and Tomorrow.
Mobile App Assurance: Yesterday, Today, and Tomorrow.Mobile App Assurance: Yesterday, Today, and Tomorrow.
Mobile App Assurance: Yesterday, Today, and Tomorrow.
 
Popular Delusions, Crowds, and the Coming Deluge: end of the Oracle?
Popular Delusions, Crowds, and the Coming Deluge: end of the Oracle?Popular Delusions, Crowds, and the Coming Deluge: end of the Oracle?
Popular Delusions, Crowds, and the Coming Deluge: end of the Oracle?
 
MTS: Controllable Test Objects
MTS: Controllable Test ObjectsMTS: Controllable Test Objects
MTS: Controllable Test Objects
 
Achieving Very High Reliability for Ubiquitous Information Technology
Achieving Very High Reliability for Ubiquitous Information Technology Achieving Very High Reliability for Ubiquitous Information Technology
Achieving Very High Reliability for Ubiquitous Information Technology
 
The Tester’s Dashboard: Release Decision Support
The Tester’s Dashboard: Release Decision SupportThe Tester’s Dashboard: Release Decision Support
The Tester’s Dashboard: Release Decision Support
 
Performance Testing Mobile and Multi-Tier Applications
Performance Testing Mobile and Multi-Tier ApplicationsPerformance Testing Mobile and Multi-Tier Applications
Performance Testing Mobile and Multi-Tier Applications
 
Testing Object-Oriented Systems: Lessons Learned
Testing Object-Oriented Systems: Lessons LearnedTesting Object-Oriented Systems: Lessons Learned
Testing Object-Oriented Systems: Lessons Learned
 
mVerify Investor Overview
mVerify Investor OverviewmVerify Investor Overview
mVerify Investor Overview
 
Model-Based Testing: Why, What, How
Model-Based Testing: Why, What, HowModel-Based Testing: Why, What, How
Model-Based Testing: Why, What, How
 
MDD and the Tautology Problem: Discussion Notes.
MDD and the Tautology Problem: Discussion Notes.MDD and the Tautology Problem: Discussion Notes.
MDD and the Tautology Problem: Discussion Notes.
 
Mobile Reliability Challenges
Mobile Reliability ChallengesMobile Reliability Challenges
Mobile Reliability Challenges
 
Experience with a Profile-based Automated Testing Environment
Experience with a Profile-based Automated Testing EnvironmentExperience with a Profile-based Automated Testing Environment
Experience with a Profile-based Automated Testing Environment
 
Testability: Factors and Strategy
Testability: Factors and StrategyTestability: Factors and Strategy
Testability: Factors and Strategy
 
Test Objects -- They Just Work
Test Objects -- They Just WorkTest Objects -- They Just Work
Test Objects -- They Just Work
 
A Million Users in a Box: The WTS Story
A Million Users in a Box: The WTS StoryA Million Users in a Box: The WTS Story
A Million Users in a Box: The WTS Story
 
ISSRE 2008 Trip Report
ISSRE 2008 Trip ReportISSRE 2008 Trip Report
ISSRE 2008 Trip Report
 

Dernier

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
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
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Dernier (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
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
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Testability: Factors and Strategy

  • 1. Testability: Factors and Strategy Robert V. Binder rvbinder@gmail.com Google Test Automation Conference Hyderabad October 28, 2010 1 © 2010, Robert V. Binder
  • 2. Overview Why testability matters White box testability Black box testability Test automation Strategy Q&A 2
  • 4. Testability Economics Assumptions Sooner is better Escapes are bad Fewer tests means more escapes Fixed budget – how to optimize Efficiency: average tests per unit of effort Effectiveness: average probability of killing a bug per unit of effort Higher testability: more better tests, same cost Lower testability: fewer weaker tests, same cost Testability defines the limits on producing complex systems with an acceptable risk of costly or dangerous defects. 4
  • 5. What Makes an SUT Testable? Controllability What do we have to do to run a test case? How hard (expensive) is it to do this? Does the SUT make it impractical to run some kinds of tests ? Given a testing goal, do we know enough to produce an adequate test suite? How much tooling can we afford? Observability What do we have to do to determine test pass/fail? How hard (expensive) is it to do this? Does the SUT make it impractical to fully determine test results ? Do we know enough to decide pass/fail/DNF ? 5
  • 11. The Anatomy of a Successful Test To reveal a bug, a test must Reach the buggy code Trigger the bug Propagate the incorrect result Incorrect result must be observed The incorrect result must be recognized as such int scale(int j) { j = j - 1; j = j/30000; return j; } // should be j = j + 1 Out of 65,536 possible values for j, only six will produce an incorrect result: -30001, -30000, -1, 0, 29999, and 30000. 11
  • 12. What Diminishes Testability? Non-deterministic Dependencies Race conditions Message latency Threading CRUD shared and unprotected data 12
  • 13. What Diminishes Testability? Complexity Essential Accidental 13
  • 14.
  • 15. What Improves Testability? Points of Control and Observation (PCOs) State test helpers Built-in Test Well-structured code 15
  • 16. PCOs Point of Control or Observation Abstraction of any kind of interface See TTCN-3 for a complete discussion What does a tester/test harness have to do activate SUT components and aspects? Components easier Aspects more interesting, but typically not directly controllable What does a tester/test harness have to do inspect SUT state or traces to evaluate a test? Traces easier, but often not sufficient or noisy Embedded state observers effective, but expensive or polluting Aspects often critical, but typically not directly observable Design for testability: Determine requirements for aspect-oriented PCOs 16
  • 17. State Test Helpers Set state Get current state Logical State Invariant Functions (LSIFs) Reset All actions controllable All events observable 17
  • 19. Test Plan and Test Size K events N states With LSIFs KN tests No LSIFs K × N3 tests 19
  • 20. Built-in Test Asserts Logging Design by Contract No Code Left Behind pattern Percolation pattern 20
  • 21. No Code Left Behind Forces How to have extensive BIT without code bloat? How to have consistent, controllable Logging Frequency of evaluation Options for handling detection Define once, reuse globally? Solution Dev adds Invariant function to each class Invariant calls InvariantCheck evaluates necessary state InvariantCheck function with global settings Selective run time evaluation constand inline idiom for no object code in production 21
  • 22. Percolation Pattern Enforces LiskovSubsitutability Implement with No Code Left Behind 22
  • 23. Well-structured Code Many well-established principles Significant for Testability No cyclic dependencies Don’t allow build dependencies to leak over structural and functional boundaries (levelization) Partition classes and packages to minimize interface complexity 23
  • 26. System Size How big is the essential system? Feature points Use cases Singly invocable menu items Command/sub commands Computational strategy Transaction processing Simulation Video games Storage Number of tables/views 26
  • 27. Network Extent How many independent nodes? Client/server Tiers Peer to peer Minimum Spanning Tree Must have one at least of each online MS-TPSO, Transaction Processing System Overview 27
  • 28. Variants How many configuration options? How many platforms supported? How many localization variants How many “editions”? Combinational coverage Try each option with every other at least once (pair-wise) Pair-wise worst case product of option sizes May be reduced with good tools 28
  • 29. Weather – Environmental The SUT has elements that cannot be practically established in the lab Cellular base station Expensive server farm Competitor/aggressor capabilities Internet – you can never step in the same river twice Test environment not feasible Must use production/field system for test Cannot stress production/field system 29
  • 30. More is Less Other things being equal, a larger system is less testable Same budget spread thinner Reducing system scope improves testability Try to partition into independent subsystems: additive versus multiplicative extent of test suite For example 10000 Feature Points 6 Network Node types 20 options, five variables each Must test when financial markets are open How big is that? 30
  • 31. M66 95000 Light Years 1 Pixel ≈ 400 Light Years Solar System ≈ 0.0025 LY
  • 32. Understanding Improves Testability Primary source of system knowledge Documented, validated? Intuited, guessed? IEEE 830 Test Model Different strokes Test-ready or hints? Oracle Computable or judgment? Indeterminate? 32
  • 34. Automation Improves Testability Bigger systems need many more tests Intellectual leverage Huge coverage space Repeatable Scale up functional suites for load test What kind of automation? Harness Developer harness System harness Capture-replay Model-based Generation Evaluation 34
  • 35. Test Automation Envelope 35 Model- Based Vision Bespoke Model-Based 5 Nines 4 Nines 3 Nines 2 Nines 1 Nine Manual 1 10 100 1,000 10,000 Scripting Reliability (Effectiveness) Productivity: Tests/Hour (Efficiency)
  • 37. minimize maximize How to Improve Testability? minimize maximize WBT = BIT + State Helpers +PCOs - Structure - Complexity– NDDs BBT = Model + Oracle + Harness – Size – Nodes – Variants - Weather 37
  • 38. Who Owns Testability Drivers? Testers typically don’t own or control the work that drives testability 38
  • 39. Strategy Emphasize Functional Testing Incentivize Repeaters High Black Box Testability Emphasize Code Coverage Manage Expectations Low Low High White Box Testability 39
  • 40. Q & A 40
  • 41. Media Credits Robert V. Binder. Design for testability in object-oriented systems. Communications of the ACM, Sept 1994. Diomidis D. Spinellis. Internet Explorer Call Tree. Unknown. Dancing Hamsters. Jackson Pollock, Autumn Rhythms. Brian Ferneyhough. Plötzlichkeitfor Large Orchestra. Robert V. Binder. Testing Object-Oriented Systems: Models, Patterns, and Tools. Microsoft, MS-TPSO, Transaction Processing System Overview. NASA, Hubble Space Telescope, M66 Galaxy. Holst - The Planets – Uranus. Peabody Concert Orchestra,Hajime Teri Murai, Music Director Test Automation Envelope. mVerify Corporation. 41

Notes de l'éditeur

  1. Autumn Rhythms, Jackson Pollock