SlideShare une entreprise Scribd logo
1  sur  37
Télécharger pour lire hors ligne
Testing Object-Oriented
Systems:
Lessons Learned
Robert V. Binder
RBSC Corporation www.rbsc.com


June 15, 2000
Overview
 • Lessons Learned
           – Design, automation, and process

 • The State of the Art
           – Design, automation, and process

 • The State of the Practice
           – Three levels
           – Testing can achieve world class quality


© 2000 Robert V. Binder, all rights reserved           2
Lessons Learned
 • Class/Cluster test design
           – Super/subclass interaction must be tested:
             test at flattened scope.
           – Design subclass test suites to re-run on
             superclasses.
           – Design superclass test suites to re-run on
             subclasses.
           – Test polymorphic servers for LSP
             compliance.


© 2000 Robert V. Binder, all rights reserved              3
Lessons Learned
 • Class/Cluster test design
           – Exercise each binding of a polymorphic
             server message
           – Test all parameters for generics
           – Test interface data flow of non-modal classes




© 2000 Robert V. Binder, all rights reserved             4
Lessons Learned
 • Subsystem/system test design
           – Control easily obscured or accidental
                     • Complex dependencies between concrete
                       state and message sequence
                     • Hierarchic control in state-based subclasses
                     • Mosaic modularity at larger scope
           – Model behavior with state machines; achieve
             transition cover or better



© 2000 Robert V. Binder, all rights reserved                          5
Lessons Learned
 • Subsystem/system test design
           – Objects don’t compose (easily)
           – Producer’s framework should not be in
             consumer’s test scope
           – Minimum system/subsystem test includes
                     • Testing exceptions
                     • Testing class associations
                     • Testing use cases (requires testable content)



© 2000 Robert V. Binder, all rights reserved                           6
Lessons Learned
 • Test Automation
           – Encapsulation and mosaic modularity
             decrease controllability and observability
           – Design-by-contract/assertions is the only
             practical counter-measure for inherent non-
             determinism and loss of testability




© 2000 Robert V. Binder, all rights reserved               7
Lessons Learned
 • Test Automation
           – Avoid stubs: increase scope of the IUT or
             test in bottom-up order
           – Design test harness to exploit the structure
             and particulars of the system under test
           – Complete app = app components + test
             components under CM control




© 2000 Robert V. Binder, all rights reserved                8
Lessons Learned
 • Process
           – Inspect for omissions and inconsistencies,
             test for everything else
           – Design for testability
                     • Implement hierarchic architecture patterns
                     • Eliminate or encapsulate cyclic dependencies
                     • Assert class invariants, at least
           – Support reuse with complementary
             producer/consumer testing strategies

© 2000 Robert V. Binder, all rights reserved                          9
Lessons Learned
 • Process
           – 3 to 6 development increments
                     • Developer class/cluster test -- Run tests
                       locally, design tests globally: “unigration”
                     • XP: “Continuous integration, relentless
                       testing”
                     • Independent build/integration group tests
                       completed increment
                     • Test suites must be regress-able
           – System testing on final increment

© 2000 Robert V. Binder, all rights reserved                          10
State of the Art

 • Representation
 • Design for Testability
 • Test Design
 • Test Automation




© 2000 Robert V. Binder, all rights reserved   11
SOA: Representation
 • Best Practices
           – Syntropy, Design by Contract
           – UML/OCL 1.0
           – Design Patterns

 • Challenges
           – Architecture
           – Limits of cartoons
           – Test design as software engineering

© 2000 Robert V. Binder, all rights reserved       12
SOA: Design for Testability

 • Best Practices
           – Frameworks/libraries with assertions
           – Lakos’ levelizable architecture
           – Percolation pattern
           – OS/400 test framework




© 2000 Robert V. Binder, all rights reserved        13
SOA: Design for Testability

 • Challenges
           – Seamless language support
           – OO testability an oxymoron?
           – Entropy horizon about 24 months




© 2000 Robert V. Binder, all rights reserved   14
SOA: Test Design

 • Best Practices
           – Test design patterns

 • Challenges
           – Intra-class coverage
           – Polymorphic paths
           – Validated failure metrics/fault models


© 2000 Robert V. Binder, all rights reserved          15
Test Design Pattern
 • New pattern schema for test design
             Name/Intent
             Context
             Fault Model                       Test Model
             Strategy
                                               Test Procedure
             Entry Criteria
                                               Oracle
             Exit Criteria
                                               Automation
             Consequences
             Known Uses

 Testing Object-Oriented Systems: Models, Patterns,
 and Tools. Addison-Wesley.
© 2000 Robert V. Binder, all rights reserved                    16
Test Design Patterns
 • Method Scope                                • Class/Cluster Scope
           – Category-Partition                   – Invariant Boundaries
           – Combinational Function               – Modal Class
           – Recursive Function                   – Quasi-Modal Class
           – Polymorphic Message                  – Polymorphic Server
                                                  – Modal Hierarchy




© 2000 Robert V. Binder, all rights reserved                               17
Test Design Patterns
 • Subsystem Scope                             • Reusable Components
           – Class Associations                  – Abstract Class
           – Round-Trip Scenarios                – Generic Class
           – Mode Machine                        – New Framework
           – Controlled Exceptions               – Popular Framework




© 2000 Robert V. Binder, all rights reserved                           18
Test Design Patterns
 • Intra-class Integration • Integration Strategy
           – Small Pop                         – Big Bang
           – Alpha-Omega Cycle                 – Bottom up
                                               – Top Down
                                               – Collaborations
                                               – Backbone
                                               – Layers
                                               – Client/Server
                                               – Distributed Services
                                               – High Frequency

© 2000 Robert V. Binder, all rights reserved                            19
Test Design Patterns
 • System Scope                                • Regression Testing
           – Extended Use Cases                  – Retest All
           – Covered in CRUD                     – Retest Risky Use Cases
           – Allocate by Profile                 – Retest Profile
                                                 – Retest Changed Code
                                                 – Retest Within Firewall




© 2000 Robert V. Binder, all rights reserved                            20
SOA: Test Automation
 • Best Practices
           – Design patterns for test automation
           – Automatic driver generation
           – Simple coverage analyzers




© 2000 Robert V. Binder, all rights reserved       21
SOA: Test Harness Patterns
 • Test Case                                   • Test Drivers
   Implementation                                 – TestDriver Super Class
           – Test Case/Test Suite                 – Percolate the Object
             Method                                 Under Test
           – Test Case /Test Suite                – Symmetric Driver
             Class
                                                  – Subclass Driver
           – Catch All Exceptions
                                                  – Private Access Driver
 • Test Control                                   – Test Control Interface
           – Server Stub                          – Drone
           – Server Proxy                         – Built-in Test Driver

© 2000 Robert V. Binder, all rights reserved                                22
SOA: Test Harness Patterns
 • Test Execution                              • Built-in Test
           – Command Line Test                    – Coherence idiom
             Bundle                               – Percolation
           – Incremental Testing                  – Built-in Test Driver
             Framework (e.g. Junit)
           – Fresh Objects




© 2000 Robert V. Binder, all rights reserved                               23
SOA: Test Automation
 • Challenges
           – Validated failure metrics/fault models
           – Tool capability gaps
                     • No support for OO-specific coverage
                     • Very weak specification-based test generation
                     • Weak support for test harness generation




© 2000 Robert V. Binder, all rights reserved                       24
State of the Practice
 • Best Practices
           – Testing by scope (about 10%)
           – Many embedded/real-time shops
           – Extreme Programming

 • Challenges
           – High-frequency/short cycle development
           – Naïve test design
           – Tool capability gaps

© 2000 Robert V. Binder, all rights reserved          25
SOP: Testing by Poking Around

 • About 70% of all organizations
 • Characteristics
           – Testing done at developer discretion
           – No test entry/exit criteria
           – High tolerance for low quality




© 2000 Robert V. Binder, all rights reserved        26
SOP: Testing by Poking Around

 • Improvement Strategy
           – Assess limits of improvability
           – Train developers in basic test design
           – Install basic tool set:
                     • Coverage analyzer
                     • Memory leak detector
                     • Test harness framework/generator (e.g. Junit)


© 2000 Robert V. Binder, all rights reserved                      27
SOP: Testing by Use Cases

 • About 20% of all organizations
 • Complies with “Unified Process” test
   approach
 • Characteristics
           – Assumes objects “just work”
           – System test from use cases
           – Frustrated with chronic bugginess
© 2000 Robert V. Binder, all rights reserved     28
SOP: Testing by Use Cases

 • Improvement Strategy
           – Achieve exit criteria for indicated class/cluster
             test patterns
           – Use appropriate component/subsystem test
             design patterns.
           – Develop testable use cases
           – Implement test automation to support
             regression testing

© 2000 Robert V. Binder, all rights reserved                29
SOP: Testing by Scope

 • About one in ten
 • Characteristics
           – Test design corresponds to scope
           – Scope-specific test entry/exit criteria
           – Appropriate testing at all scopes
           – Effective test automation
           – Stable, repeatable process
© 2000 Robert V. Binder, all rights reserved           30
SOP: Testing by Scope

 • Improvement Strategy
           – Internal test design pattern-mining
           – Design for testability
           – Advanced test automation
           – Quantified closed loop feedback




© 2000 Robert V. Binder, all rights reserved       31
Best Practice Examples

 • Stepstone Corporation
 • Ericsson CEE Project



 • Testing was the primary quality technique



© 2000 Robert V. Binder, all rights reserved   32
Stepstone Corporation

 • ICpack 201 -- Objective-C class library
 • Inspections for all classes
 • Extensive automated test harness
   developed for each complex class
 • No systematic test design


© 2000 Robert V. Binder, all rights reserved   33
Ericsson CEE

 • 75 KLOC C++ cellular support application
 • Systematic testing at class, cluster, and
   system scope
 • No other verification techniques used




© 2000 Robert V. Binder, all rights reserved   34
Achieving World Class OO Quality

 • Best-in-Class level:
           – An average of “less than 0.025 user-reported
             defects per function point” in the first year
             after release

 • World Class = 10x Best in Class

                     Capers Jones. Software Quality: Analysis and Guidelines for Success.

                     (London: International Thompson Computer Press, 1997) p. 44


© 2000 Robert V. Binder, all rights reserved                                                35
Achieving World Class OO Quality


 Organization/ KLOC FP                                     Major   Bugs/FP
 Language                                                  Post
                                                           Release
                                                           Bugs
 Stepstone                                     12   414       5    0.0121
 Objective-C
 Ericsson                                      75   1364      7    0.0051
 C++




© 2000 Robert V. Binder, all rights reserved                                 36
Summary
 • Lessons learned: OO testing requires
   unique test design approaches
 • State of the art: expressed in patterns
 • State of the practice: world class quality
   can be achieved through testing




© 2000 Robert V. Binder, all rights reserved    37

Contenu connexe

Tendances

Software Testing Training : Tonex Training
Software Testing Training : Tonex TrainingSoftware Testing Training : Tonex Training
Software Testing Training : Tonex Training
Bryan Len
 
Software testing strategies
Software testing strategiesSoftware testing strategies
Software testing strategies
Krishna Sujeer
 
Software requirement verification & validation
Software requirement verification & validationSoftware requirement verification & validation
Software requirement verification & validation
Abdul Basit
 
documentation-testing.ppt
documentation-testing.pptdocumentation-testing.ppt
documentation-testing.ppt
Gaurav Nigam
 
Testing documents
Testing documentsTesting documents
Testing documents
suhasreddy1
 

Tendances (19)

Software Testing Training : Tonex Training
Software Testing Training : Tonex TrainingSoftware Testing Training : Tonex Training
Software Testing Training : Tonex Training
 
Software testing and analysis
Software testing and analysisSoftware testing and analysis
Software testing and analysis
 
software testing
software testingsoftware testing
software testing
 
Testing strategies -2
Testing strategies -2Testing strategies -2
Testing strategies -2
 
11 software testing_strategy
11 software testing_strategy11 software testing_strategy
11 software testing_strategy
 
Chapter 13 software testing strategies
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategies
 
Software testing strategies
Software testing strategiesSoftware testing strategies
Software testing strategies
 
Softwaretestingstrategies
SoftwaretestingstrategiesSoftwaretestingstrategies
Softwaretestingstrategies
 
Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing Strategies
 
testing strategies and tactics
 testing strategies and tactics testing strategies and tactics
testing strategies and tactics
 
Software requirement verification & validation
Software requirement verification & validationSoftware requirement verification & validation
Software requirement verification & validation
 
Software Testing Fundamentals | Basics Of Software Testing
Software Testing Fundamentals | Basics Of Software TestingSoftware Testing Fundamentals | Basics Of Software Testing
Software Testing Fundamentals | Basics Of Software Testing
 
Python: Object-Oriented Testing (Unit Testing)
Python: Object-Oriented Testing (Unit Testing)Python: Object-Oriented Testing (Unit Testing)
Python: Object-Oriented Testing (Unit Testing)
 
Software testing
Software testingSoftware testing
Software testing
 
documentation-testing.ppt
documentation-testing.pptdocumentation-testing.ppt
documentation-testing.ppt
 
Software testing
Software testingSoftware testing
Software testing
 
Testing and types of Testing
Testing and types of TestingTesting and types of Testing
Testing and types of Testing
 
Testing documents
Testing documentsTesting documents
Testing documents
 
Chapter 14 software testing techniques
Chapter 14 software testing techniquesChapter 14 software testing techniques
Chapter 14 software testing techniques
 

Similaire à Testing Object-Oriented Systems: Lessons Learned

Detection of Seed Methods for Quantification of Feature Confinement
Detection of Seed Methods for Quantification of Feature ConfinementDetection of Seed Methods for Quantification of Feature Confinement
Detection of Seed Methods for Quantification of Feature Confinement
Andrzej Olszak
 
Web Application Release
Web Application ReleaseWeb Application Release
Web Application Release
Piyush Mattoo
 

Similaire à Testing Object-Oriented Systems: Lessons Learned (20)

Vaidyanathan Ramalingam Trade Off Economics In Testing Conference Speech
Vaidyanathan Ramalingam Trade Off Economics In Testing Conference SpeechVaidyanathan Ramalingam Trade Off Economics In Testing Conference Speech
Vaidyanathan Ramalingam Trade Off Economics In Testing Conference Speech
 
Vaidyanathan Ramalingam_Iterative Testing_SOFTEC_2_July2011_Silicon India Con...
Vaidyanathan Ramalingam_Iterative Testing_SOFTEC_2_July2011_Silicon India Con...Vaidyanathan Ramalingam_Iterative Testing_SOFTEC_2_July2011_Silicon India Con...
Vaidyanathan Ramalingam_Iterative Testing_SOFTEC_2_July2011_Silicon India Con...
 
Vaidyanathan Ramalingam Software Testing Eco System Conference Speech
Vaidyanathan Ramalingam Software Testing Eco System Conference SpeechVaidyanathan Ramalingam Software Testing Eco System Conference Speech
Vaidyanathan Ramalingam Software Testing Eco System Conference Speech
 
Vaidyanathan Ramalingam_Testing in Agile_SOFTEC_2_July2011_Silicon India Conf...
Vaidyanathan Ramalingam_Testing in Agile_SOFTEC_2_July2011_Silicon India Conf...Vaidyanathan Ramalingam_Testing in Agile_SOFTEC_2_July2011_Silicon India Conf...
Vaidyanathan Ramalingam_Testing in Agile_SOFTEC_2_July2011_Silicon India Conf...
 
Vaidyanathan Ramalingam Agile Testing Leadership Lessons Softec 2 July2011
Vaidyanathan Ramalingam Agile Testing Leadership Lessons Softec 2 July2011Vaidyanathan Ramalingam Agile Testing Leadership Lessons Softec 2 July2011
Vaidyanathan Ramalingam Agile Testing Leadership Lessons Softec 2 July2011
 
Vaidyanathan Ramalingam Waterfall Vs Agile Testing Conference Speech
Vaidyanathan Ramalingam Waterfall Vs Agile Testing Conference SpeechVaidyanathan Ramalingam Waterfall Vs Agile Testing Conference Speech
Vaidyanathan Ramalingam Waterfall Vs Agile Testing Conference Speech
 
Vaidyanathan Ramalingam Silicon India Testing Conference 2 July2011 Speech
Vaidyanathan Ramalingam Silicon India Testing Conference 2 July2011 SpeechVaidyanathan Ramalingam Silicon India Testing Conference 2 July2011 Speech
Vaidyanathan Ramalingam Silicon India Testing Conference 2 July2011 Speech
 
Vaidyanathan Ramalingam Rca In Testing Conference Speech
Vaidyanathan Ramalingam Rca In Testing Conference SpeechVaidyanathan Ramalingam Rca In Testing Conference Speech
Vaidyanathan Ramalingam Rca In Testing Conference Speech
 
Vaidyanathan Ramalingam Testing Checklist Conference Speech
Vaidyanathan Ramalingam Testing Checklist Conference SpeechVaidyanathan Ramalingam Testing Checklist Conference Speech
Vaidyanathan Ramalingam Testing Checklist Conference Speech
 
Vaidyanathan Ramalingam_Sprint Testing_SOFTEC_2_July2011_Silicon India Conf_B...
Vaidyanathan Ramalingam_Sprint Testing_SOFTEC_2_July2011_Silicon India Conf_B...Vaidyanathan Ramalingam_Sprint Testing_SOFTEC_2_July2011_Silicon India Conf_B...
Vaidyanathan Ramalingam_Sprint Testing_SOFTEC_2_July2011_Silicon India Conf_B...
 
Vaidyanathan Ramalingam Agile Conference Speech
Vaidyanathan Ramalingam Agile Conference SpeechVaidyanathan Ramalingam Agile Conference Speech
Vaidyanathan Ramalingam Agile Conference Speech
 
Vaidyanathan Ramalingam Agile Testing Conference Speech
Vaidyanathan Ramalingam Agile Testing Conference SpeechVaidyanathan Ramalingam Agile Testing Conference Speech
Vaidyanathan Ramalingam Agile Testing Conference Speech
 
Vaidyanathan Ramalingam Rca In Agile Conference Speech
Vaidyanathan Ramalingam Rca In Agile Conference SpeechVaidyanathan Ramalingam Rca In Agile Conference Speech
Vaidyanathan Ramalingam Rca In Agile Conference Speech
 
Vaidyanathan Ramalingam_Agile QA_SOFTEC_2_July2011_Silicon India Conf_Bangalore
Vaidyanathan Ramalingam_Agile QA_SOFTEC_2_July2011_Silicon India Conf_BangaloreVaidyanathan Ramalingam_Agile QA_SOFTEC_2_July2011_Silicon India Conf_Bangalore
Vaidyanathan Ramalingam_Agile QA_SOFTEC_2_July2011_Silicon India Conf_Bangalore
 
Detection of Seed Methods for Quantification of Feature Confinement
Detection of Seed Methods for Quantification of Feature ConfinementDetection of Seed Methods for Quantification of Feature Confinement
Detection of Seed Methods for Quantification of Feature Confinement
 
Testing banking apps
Testing banking appsTesting banking apps
Testing banking apps
 
Service Testing & Virtualization in an Enterprise Environments
Service Testing & Virtualization in an Enterprise EnvironmentsService Testing & Virtualization in an Enterprise Environments
Service Testing & Virtualization in an Enterprise Environments
 
Pm 6 testing
Pm 6 testingPm 6 testing
Pm 6 testing
 
Pm 6 testing
Pm 6 testingPm 6 testing
Pm 6 testing
 
Web Application Release
Web Application ReleaseWeb Application Release
Web Application Release
 

Plus de Bob 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
 
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
 
Software Test Patterns: Successes and Challenges
Software Test Patterns: Successes and ChallengesSoftware Test Patterns: Successes and Challenges
Software Test Patterns: Successes and Challenges
 

Dernier

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
Enterprise Knowledge
 

Dernier (20)

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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

Testing Object-Oriented Systems: Lessons Learned

  • 1. Testing Object-Oriented Systems: Lessons Learned Robert V. Binder RBSC Corporation www.rbsc.com June 15, 2000
  • 2. Overview • Lessons Learned – Design, automation, and process • The State of the Art – Design, automation, and process • The State of the Practice – Three levels – Testing can achieve world class quality © 2000 Robert V. Binder, all rights reserved 2
  • 3. Lessons Learned • Class/Cluster test design – Super/subclass interaction must be tested: test at flattened scope. – Design subclass test suites to re-run on superclasses. – Design superclass test suites to re-run on subclasses. – Test polymorphic servers for LSP compliance. © 2000 Robert V. Binder, all rights reserved 3
  • 4. Lessons Learned • Class/Cluster test design – Exercise each binding of a polymorphic server message – Test all parameters for generics – Test interface data flow of non-modal classes © 2000 Robert V. Binder, all rights reserved 4
  • 5. Lessons Learned • Subsystem/system test design – Control easily obscured or accidental • Complex dependencies between concrete state and message sequence • Hierarchic control in state-based subclasses • Mosaic modularity at larger scope – Model behavior with state machines; achieve transition cover or better © 2000 Robert V. Binder, all rights reserved 5
  • 6. Lessons Learned • Subsystem/system test design – Objects don’t compose (easily) – Producer’s framework should not be in consumer’s test scope – Minimum system/subsystem test includes • Testing exceptions • Testing class associations • Testing use cases (requires testable content) © 2000 Robert V. Binder, all rights reserved 6
  • 7. Lessons Learned • Test Automation – Encapsulation and mosaic modularity decrease controllability and observability – Design-by-contract/assertions is the only practical counter-measure for inherent non- determinism and loss of testability © 2000 Robert V. Binder, all rights reserved 7
  • 8. Lessons Learned • Test Automation – Avoid stubs: increase scope of the IUT or test in bottom-up order – Design test harness to exploit the structure and particulars of the system under test – Complete app = app components + test components under CM control © 2000 Robert V. Binder, all rights reserved 8
  • 9. Lessons Learned • Process – Inspect for omissions and inconsistencies, test for everything else – Design for testability • Implement hierarchic architecture patterns • Eliminate or encapsulate cyclic dependencies • Assert class invariants, at least – Support reuse with complementary producer/consumer testing strategies © 2000 Robert V. Binder, all rights reserved 9
  • 10. Lessons Learned • Process – 3 to 6 development increments • Developer class/cluster test -- Run tests locally, design tests globally: “unigration” • XP: “Continuous integration, relentless testing” • Independent build/integration group tests completed increment • Test suites must be regress-able – System testing on final increment © 2000 Robert V. Binder, all rights reserved 10
  • 11. State of the Art • Representation • Design for Testability • Test Design • Test Automation © 2000 Robert V. Binder, all rights reserved 11
  • 12. SOA: Representation • Best Practices – Syntropy, Design by Contract – UML/OCL 1.0 – Design Patterns • Challenges – Architecture – Limits of cartoons – Test design as software engineering © 2000 Robert V. Binder, all rights reserved 12
  • 13. SOA: Design for Testability • Best Practices – Frameworks/libraries with assertions – Lakos’ levelizable architecture – Percolation pattern – OS/400 test framework © 2000 Robert V. Binder, all rights reserved 13
  • 14. SOA: Design for Testability • Challenges – Seamless language support – OO testability an oxymoron? – Entropy horizon about 24 months © 2000 Robert V. Binder, all rights reserved 14
  • 15. SOA: Test Design • Best Practices – Test design patterns • Challenges – Intra-class coverage – Polymorphic paths – Validated failure metrics/fault models © 2000 Robert V. Binder, all rights reserved 15
  • 16. Test Design Pattern • New pattern schema for test design Name/Intent Context Fault Model Test Model Strategy Test Procedure Entry Criteria Oracle Exit Criteria Automation Consequences Known Uses Testing Object-Oriented Systems: Models, Patterns, and Tools. Addison-Wesley. © 2000 Robert V. Binder, all rights reserved 16
  • 17. Test Design Patterns • Method Scope • Class/Cluster Scope – Category-Partition – Invariant Boundaries – Combinational Function – Modal Class – Recursive Function – Quasi-Modal Class – Polymorphic Message – Polymorphic Server – Modal Hierarchy © 2000 Robert V. Binder, all rights reserved 17
  • 18. Test Design Patterns • Subsystem Scope • Reusable Components – Class Associations – Abstract Class – Round-Trip Scenarios – Generic Class – Mode Machine – New Framework – Controlled Exceptions – Popular Framework © 2000 Robert V. Binder, all rights reserved 18
  • 19. Test Design Patterns • Intra-class Integration • Integration Strategy – Small Pop – Big Bang – Alpha-Omega Cycle – Bottom up – Top Down – Collaborations – Backbone – Layers – Client/Server – Distributed Services – High Frequency © 2000 Robert V. Binder, all rights reserved 19
  • 20. Test Design Patterns • System Scope • Regression Testing – Extended Use Cases – Retest All – Covered in CRUD – Retest Risky Use Cases – Allocate by Profile – Retest Profile – Retest Changed Code – Retest Within Firewall © 2000 Robert V. Binder, all rights reserved 20
  • 21. SOA: Test Automation • Best Practices – Design patterns for test automation – Automatic driver generation – Simple coverage analyzers © 2000 Robert V. Binder, all rights reserved 21
  • 22. SOA: Test Harness Patterns • Test Case • Test Drivers Implementation – TestDriver Super Class – Test Case/Test Suite – Percolate the Object Method Under Test – Test Case /Test Suite – Symmetric Driver Class – Subclass Driver – Catch All Exceptions – Private Access Driver • Test Control – Test Control Interface – Server Stub – Drone – Server Proxy – Built-in Test Driver © 2000 Robert V. Binder, all rights reserved 22
  • 23. SOA: Test Harness Patterns • Test Execution • Built-in Test – Command Line Test – Coherence idiom Bundle – Percolation – Incremental Testing – Built-in Test Driver Framework (e.g. Junit) – Fresh Objects © 2000 Robert V. Binder, all rights reserved 23
  • 24. SOA: Test Automation • Challenges – Validated failure metrics/fault models – Tool capability gaps • No support for OO-specific coverage • Very weak specification-based test generation • Weak support for test harness generation © 2000 Robert V. Binder, all rights reserved 24
  • 25. State of the Practice • Best Practices – Testing by scope (about 10%) – Many embedded/real-time shops – Extreme Programming • Challenges – High-frequency/short cycle development – Naïve test design – Tool capability gaps © 2000 Robert V. Binder, all rights reserved 25
  • 26. SOP: Testing by Poking Around • About 70% of all organizations • Characteristics – Testing done at developer discretion – No test entry/exit criteria – High tolerance for low quality © 2000 Robert V. Binder, all rights reserved 26
  • 27. SOP: Testing by Poking Around • Improvement Strategy – Assess limits of improvability – Train developers in basic test design – Install basic tool set: • Coverage analyzer • Memory leak detector • Test harness framework/generator (e.g. Junit) © 2000 Robert V. Binder, all rights reserved 27
  • 28. SOP: Testing by Use Cases • About 20% of all organizations • Complies with “Unified Process” test approach • Characteristics – Assumes objects “just work” – System test from use cases – Frustrated with chronic bugginess © 2000 Robert V. Binder, all rights reserved 28
  • 29. SOP: Testing by Use Cases • Improvement Strategy – Achieve exit criteria for indicated class/cluster test patterns – Use appropriate component/subsystem test design patterns. – Develop testable use cases – Implement test automation to support regression testing © 2000 Robert V. Binder, all rights reserved 29
  • 30. SOP: Testing by Scope • About one in ten • Characteristics – Test design corresponds to scope – Scope-specific test entry/exit criteria – Appropriate testing at all scopes – Effective test automation – Stable, repeatable process © 2000 Robert V. Binder, all rights reserved 30
  • 31. SOP: Testing by Scope • Improvement Strategy – Internal test design pattern-mining – Design for testability – Advanced test automation – Quantified closed loop feedback © 2000 Robert V. Binder, all rights reserved 31
  • 32. Best Practice Examples • Stepstone Corporation • Ericsson CEE Project • Testing was the primary quality technique © 2000 Robert V. Binder, all rights reserved 32
  • 33. Stepstone Corporation • ICpack 201 -- Objective-C class library • Inspections for all classes • Extensive automated test harness developed for each complex class • No systematic test design © 2000 Robert V. Binder, all rights reserved 33
  • 34. Ericsson CEE • 75 KLOC C++ cellular support application • Systematic testing at class, cluster, and system scope • No other verification techniques used © 2000 Robert V. Binder, all rights reserved 34
  • 35. Achieving World Class OO Quality • Best-in-Class level: – An average of “less than 0.025 user-reported defects per function point” in the first year after release • World Class = 10x Best in Class Capers Jones. Software Quality: Analysis and Guidelines for Success. (London: International Thompson Computer Press, 1997) p. 44 © 2000 Robert V. Binder, all rights reserved 35
  • 36. Achieving World Class OO Quality Organization/ KLOC FP Major Bugs/FP Language Post Release Bugs Stepstone 12 414 5 0.0121 Objective-C Ericsson 75 1364 7 0.0051 C++ © 2000 Robert V. Binder, all rights reserved 36
  • 37. Summary • Lessons learned: OO testing requires unique test design approaches • State of the art: expressed in patterns • State of the practice: world class quality can be achieved through testing © 2000 Robert V. Binder, all rights reserved 37