Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation."— 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 Behavioral Patterns Chain of Responsibility Command Interpreter Iterator Mediator Momento Observer State Strategy* Template Method Visitor*

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

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)

25


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

Similar presentations


Ads by Google