![Page 1: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/1.jpg)
Testing Extensible Design Patterns in OO Frameworks through Scenario TemplatesD.S. Sanders
Software Verification & Validation
![Page 2: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/2.jpg)
Design Patterns
Proven architectures for constructing flexible and maintainable software
Promotes design reuse Language independent Neither classes nor objects
![Page 3: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/3.jpg)
Origins & Progenitors
The “Gang of Four” Eric Gamma Richard Helm Ralph Johnson John Vlissides
Collectively penned “Design Patterns”: Elements of Reusable OO Software
Written between 1991-1994; released ‘95
![Page 4: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/4.jpg)
Creational Patterns
Abstract Factory* Factory Method* Builder Prototype Singleton
![Page 5: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/5.jpg)
Structural Patterns
Adapter Bridge Composite Decorator Façade Flyweight Visitor
![Page 6: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/6.jpg)
Behavioral Patterns
Chain of Responsibility Command Interpreter Iterator Mediator
Momento Observer State Strategy* Template Method Visitor*
![Page 7: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/7.jpg)
Post Gang of Four Patterns
Architectural Patterns Model – View – Controller
Concurrency Patterns Single Threaded Execution Guarded Suspension Balking Read / Write Lock Two Phase Termination
![Page 8: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/8.jpg)
Memory Lane – Comp 110
Dynamic Typing Some or all type checking done at runtime
![Page 9: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/9.jpg)
More memory lane – Comp 110 Dynamic Binding
Determining at runtime the appropriate method to call
![Page 10: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/10.jpg)
Pattern Categorization - Redux Static
Does not allow for easy extension Behavior does not change after compile time Easier to test
Extensible Allows functionality of the app to change Adds new classes to the system Some of the classes loaded at runtime
![Page 11: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/11.jpg)
Factory Method Pattern
![Page 12: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/12.jpg)
Factory Method Example
![Page 13: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/13.jpg)
Factory Method Example
![Page 14: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/14.jpg)
Strategy Pattern
![Page 15: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/15.jpg)
Strategy Pattern Example
![Page 16: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/16.jpg)
So much testing…so little time Scenario Based Testing Method Sequence Specification (MtSS) Message Sequence Specification (MgSS) Message Framework Specification (MfSS)
![Page 17: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/17.jpg)
The Bank
![Page 18: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/18.jpg)
MtSS of Account Class and MgSS of Method Withdraw
![Page 19: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/19.jpg)
Message Framework Sequence Specs
![Page 20: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/20.jpg)
Test Cases
MfSS Slicing Partition Testing
Object Types Number of / Groups of Objects Object Input Space
![Page 21: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/21.jpg)
More Memory Lane – Comp 380 Stress Testing Boundary Testing Negative Testing Random Testing
![Page 22: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/22.jpg)
Compensating for Extensibility Testing Dynamic Typing Testing Dynamic Binding Testing Extensibility
![Page 23: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/23.jpg)
Testing Results
![Page 24: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/24.jpg)
Conclusion
Testing Extensible Design Patterns is difficult MfSS will generate scenario templates which
lead to test cases Use in Industry seems limited Source Code Credit
Kathy Sierra, Bert Bates (Factory, Strategy) Collegeboard.org (GridWorld Case Study)
![Page 25: Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation](https://reader030.vdocument.in/reader030/viewer/2022020716/56649f225503460f94c3a20a/html5/thumbnails/25.jpg)