Professional Documents
Culture Documents
Levels of Testing
Composition
MM-Graphs
Conclusions
Integration Testing
Mohammad Mousavi
Eindhoven University of Technology, The Netherlands
Levels of Testing
Composition
MM-Graphs
Conclusions
Outline
Integration and (De)Composition Levels of Testing Composition MM-Graphs Conclusions
Levels of Testing
Composition
MM-Graphs
Conclusions
Waterfall Model
Traditional Method
top-down functional decomposition
Drawbacks
huge gap between spec. and testable product no possibility of interaction on intermediate products
Levels of Testing
Composition
MM-Graphs
Conclusions
Waterfall Model
Traditional Method
top-down functional decomposition
Drawbacks
huge gap between spec. and testable product no possibility of interaction on intermediate products
Levels of Testing
Composition
MM-Graphs
Conclusions
New Paradigms
Composition
a simple yet tangible basis add to it gradually
Contemporary Processes
incremental: alleviate work-force bottleneck evolutionary: to meet changing requirements spiral: evolutionary combined with rapid prototyping possibility of go/no-go feedback
Mousavi: Integration Testing
Levels of Testing
Composition
MM-Graphs
Conclusions
Eect on Testing
Traditional Paradigm
testing bottleneck in the end complete requirement while testing
Contemporary Processes
changing / evolving requirements mainly: regression / progression testing
Levels of Testing
Composition
MM-Graphs
Conclusions
Outline
Integration and (De)Composition Levels of Testing Composition MM-Graphs Conclusions
Levels of Testing
Composition
MM-Graphs
Conclusions
Levels of Testing
Unit Testing
individual pieces of functionality: interleaving of program statements single source and sink nodes fairly easy to localize the faults
Unit (Function, Method)
Levels of Testing
Composition
MM-Graphs
Conclusions
Levels of Testing
Integration Testing
detailed behavior interleaving of module port events crossing the unit boundaries design-based testing
Integrated Units
Levels of Testing
Composition
MM-Graphs
Conclusions
Levels of Testing
System Testing
overall behavior: interleaving of input-output port events requirements-based testing
System
Levels of Testing
Composition
MM-Graphs
Conclusions
Outline
Integration and (De)Composition Levels of Testing Composition MM-Graphs Conclusions
Levels of Testing
Composition
MM-Graphs
Conclusions
Naive Approach
Big-Bang Integration Testing
compose everything treat the system as a unit
Drawbacks
wait till all modules are in place impossible to (nd and) localize the bugs need to extend the techniques
Levels of Testing
Composition
MM-Graphs
Conclusions
Naive Approach
Levels of Testing
Composition
MM-Graphs
Conclusions
Incremental Approach
Problems
dependencies beyond sub-system boundaries still need to extend the techniques (e.g., single source and sink assumptions, treat method calls in ow graphs)
Levels of Testing
Composition
MM-Graphs
Conclusions
Stubs
Dependencies
cut the dependencies beyond the sub-system replace with an apparently correct piece of software: stub wrap the sub-system in the main test-bed: driver
Levels of Testing
Composition
MM-Graphs
Conclusions
Stubs: Example
ValidatePIN(PIN pin): bool; begin if int(PIN) < 4444 then return true else return false end if end
ATM
Validate PIN
Screen Driver
Get PIN
Levels of Testing
Composition
MM-Graphs
Conclusions
ATM
Validate PIN
Screen Driver
Get PIN
Levels of Testing
Composition
MM-Graphs
Conclusions
Decomposition
structural decomposition (e.g., aggregation and composition): no information about dependencies functional/behavioral decomposition (e.g., association, uses relation): call-graphs
stub
Levels of Testing
Composition
MM-Graphs
Conclusions
Integration: Top-Down
start with main and stubs as units test the logic of main integration: breadth-rst
Validate PIN
Drawback
many stubs many test sessions
Screen Driver Get PIN
Levels of Testing
Composition
MM-Graphs
Conclusions
Integration: Bottom-Up
ATM
Drawbacks
many drivers many test sessions
Screen Driver
Validate PIN
Get PIN
Levels of Testing
Composition
MM-Graphs
Conclusions
Integration: Sandwich
Basic Idea
big-bang on sub-trees less stub implementation
Drawback
more dicult to locate the fault
Levels of Testing
Composition
MM-Graphs
Conclusions
pair-wise integration neighborhood integration check the book for details (not much, I am afraid)
Levels of Testing
Composition
MM-Graphs
Conclusions
Outline
Integration and (De)Composition Levels of Testing Composition MM-Graphs Conclusions
Levels of Testing
Composition
MM-Graphs
Conclusions
Basic Idea
edges: message (and return) entry (and exit) points for modules nodes: paths between message and return
r1 p1
p1 m1 p0 m0 r0
Levels of Testing
Composition
MM-Graphs
Conclusions
call m0
Levels of Testing
Composition
MM-Graphs
Conclusions
call m0
call m0
Levels of Testing
Composition
MM-Graphs
Conclusions
call m0
ret m0
Levels of Testing
Composition
MM-Graphs
Conclusions
call m0
ret m0
Levels of Testing
Composition
MM-Graphs
Conclusions
test-session: sandwich on ValidatePin (with GetPin, PrintScreen and ContactBank) driver: calls ValidatePin exercise: generate the MM-Graph for: ValidatePin with GetPin, reduce it.
Levels of Testing
Composition
MM-Graphs
Conclusions
Levels of Testing
Composition
MM-Graphs
Conclusions
Outline
Integration and (De)Composition Levels of Testing Composition MM-Graphs Conclusions
Levels of Testing
Composition
MM-Graphs
Conclusions
Conclusions
Levels of Testing
Composition
MM-Graphs
Conclusions
Bart Knaack (Logica, Senior test manager): Testen in de Praktijk Machiel van der Bijl (Axini): Recent developments in Model-Based Testing