SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Similar a 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
 

Similar a 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
 

Más 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
 

Más 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
 

Último

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Último (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

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

Notas del editor

  1. Autumn Rhythms, Jackson Pollock