1 / 25

Testing Extensible Design Patterns in OO Frameworks through Scenario Templates

Testing Extensible Design Patterns in OO Frameworks through Scenario Templates. D.S. Sanders Software Verification & Validation. Design Patterns. Proven architectures for constructing flexible and maintainable software Promotes design reuse Language independent Neither classes nor objects .

shayna
Download Presentation

Testing Extensible Design Patterns in OO Frameworks through Scenario Templates

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation

  2. Design Patterns • Proven architectures for constructing flexible and maintainable software • Promotes design reuse • Language independent • Neither classes nor objects

  3. 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

  4. Creational Patterns • Abstract Factory* • Factory Method* • Builder • Prototype • Singleton

  5. Structural Patterns • Adapter • Bridge • Composite • Decorator • Façade • Flyweight • Visitor

  6. Chain of Responsibility Command Interpreter Iterator Mediator Momento Observer State Strategy* Template Method Visitor* Behavioral Patterns

  7. Post Gang of Four Patterns • Architectural Patterns • Model – View – Controller • Concurrency Patterns • Single Threaded Execution • Guarded Suspension • Balking • Read / Write Lock • Two Phase Termination

  8. Memory Lane – Comp 110 • Dynamic Typing • Some or all type checking done at runtime

  9. More memory lane – Comp 110 • Dynamic Binding • Determining at runtime the appropriate method to call

  10. 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

  11. Factory Method Pattern

  12. Factory Method Example

  13. Factory Method Example

  14. Strategy Pattern

  15. Strategy Pattern Example

  16. So much testing…so little time • Scenario Based Testing • Method Sequence Specification (MtSS) • Message Sequence Specification (MgSS) • Message Framework Specification (MfSS)

  17. The Bank

  18. MtSS of Account Class and MgSS of Method Withdraw

  19. Message Framework Sequence Specs

  20. Test Cases • MfSS Slicing • Partition Testing • Object Types • Number of / Groups of Objects • Object Input Space

  21. More Memory Lane – Comp 380 • Stress Testing • Boundary Testing • Negative Testing • Random Testing

  22. Compensating for Extensibility • Testing Dynamic Typing • Testing Dynamic Binding • Testing Extensibility

  23. Testing Results

  24. 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)

More Related