Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based...
Transcript of Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based...
![Page 1: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/1.jpg)
Integration TestingPath Based"
Chapter 13!
![Page 2: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/2.jpg)
IntP–2
Call graph based integration"
Use the call graph instead of the decomposition tree!
What is a call graph?!
![Page 3: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/3.jpg)
IntP–3
Call graph definition"
Is a directed, labeled graph! Vertices are methods "
A directed edge joins calling vertex to the called vertex "
Adjacency matrix is also used"
Does not scale well, although some insights are useful" Nodes of high degree are critical"
![Page 4: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/4.jpg)
IntP–4
SATM call graph example"
15
7
20
21
9
10
12
11
16
17 18 19
22
2324
2526
14 2 36 8
4
13
15
27
Call Graph of the SATM System
Look at adjacency matrix p204"
![Page 5: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/5.jpg)
IntP–5
Call graph integration strategies"
What types of integration strategies are used?!
![Page 6: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/6.jpg)
IntP–6
Call graph integration strategies – 2"
Pair-wise Integration Testing!
Neighborhood Integration Testing !
![Page 7: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/7.jpg)
IntP–7
Pair-wise integration"
What is pair-wise integration!
![Page 8: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/8.jpg)
IntP–8
Some Pair-wise Integration Sessions
15
7
20
21
9
10
12
11
16
17 18 19
22
2324
2526
14 2 36 8
4
13
15
27
Pair-wise integration session example"
![Page 9: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/9.jpg)
IntP–9
Pair-wise integration – 2"
The idea behind Pair-Wise integration testing ! Eliminate need for developing stubs / drivers "
Use actual code instead of stubs/drivers"
![Page 10: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/10.jpg)
IntP–10
Pair-wise integration – 3"
In order not to deteriorate the process to a big-bang strategy! Restrict a testing session to just a pair of units in the
call graph "
Results in one integration test session for each edge in the call graph "
![Page 11: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/11.jpg)
IntP–11
Neighbourhood integration"
What is neighbourhood integration?!
![Page 12: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/12.jpg)
IntP–12
15
7
20
21
9
10
12
11
16
17 18 19
22
2324
2526
14 2 36 8
4
13
15
27
Two Neighborhood Integration SessionsNeighbourhood integration example "
Neighbourhoods for nodes 16 & 26"
![Page 13: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/13.jpg)
IntP–13
Neighbourhood integration – 2"
The neighbourhood of a node in a graph! The set of nodes that are one edge away from the
given node"
In a directed graph! All the immediate predecessor nodes and all the
immediate successor nodes of a given node"
![Page 14: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/14.jpg)
IntP–14
Neighbourhood integration – 3"
Neighborhood integration testing ! Reduces the number of test sessions "
Fault isolation is difficult"
![Page 15: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/15.jpg)
IntP–15
Pros of call-graph integration"
What are the pros of call-graph integration?!
!
![Page 16: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/16.jpg)
IntP–16
Pros of call-graph integration – 2"
Reduces the need for drivers and stubs! Relative to functional decomposition integration"
Neighborhoods can be combined to create “villages”!
Closer to a build sequence! Well suited to devising a sequence of builds with
which to implement a system "
![Page 17: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/17.jpg)
IntP–17
Cons of call-graph integration"
What are the cons of call-graph integration?!
!
![Page 18: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/18.jpg)
IntP–18
Cons of call-graph integration – 2"
Suffers from fault isolation problems! Especially for large neighborhoods "
Redundancy! Nodes can appear in several neighborhoods "
Assumes that correct behaviour follows from correct units and correct interfaces! Not always the case"
!
![Page 19: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/19.jpg)
IntP–19
Path-based integration"
What is path-based integration?"
Why use it?!
![Page 20: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/20.jpg)
IntP–20
Path-Based Integration – 2"
Motivation! Combine structural and behavioral type of testing for
integration testing as we did for unit testing"
Basic idea! Focus on interactions among system units" Rather than merely to test interfaces among
separately developed and tested units "
Interface-based testing is structural while interaction-based testing is behavioral!
![Page 21: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/21.jpg)
IntP–21
Source node"
What is it? "
![Page 22: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/22.jpg)
IntP–22
Source node – 2"
A program statement fragment at which program execution begins or resumes.! For example the first “begin” statement in a program."
Nodes immediately after nodes that transfer control to other units. "
![Page 23: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/23.jpg)
IntP–23
Sink node"
What is a sink node? !
![Page 24: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/24.jpg)
IntP–24
Sink node"
A statement fragment at which program execution terminates ! The final “end” in a program as well as statements
that transfer control to other units"
![Page 25: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/25.jpg)
IntP–25
Module execution path (MEP)"
What is a module execution path? !
![Page 26: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/26.jpg)
IntP–26
Module execution path (MEP) – 2"
A sequence of statements within a module that! Begins with a source node "
Ends with a sink node "
With no intervening sink nodes "
![Page 27: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/27.jpg)
IntP–27
Message"
What is a message? !
![Page 28: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/28.jpg)
IntP–28
Message – 2"
A programming language mechanism by which one unit transfers control to another unit!
Usually interpreted as subroutine / function invocations!
The unit which receives the message always returns control to the message source!
![Page 29: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/29.jpg)
IntP–29
MM-path"
What is an MM-path?"
![Page 30: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/30.jpg)
IntP–30
MM-path – 2"
A module to module path! An interleaved sequence of module execution paths
and messages "
Used to describes sequences of module execution paths that include transfers of control among separate units!
MM-paths always represent feasible execution paths, and these paths cross unit boundaries!
![Page 31: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/31.jpg)
IntP–31
1 2
3
4
5
6
A
B
1
2
3
4
C
1
2
5
3
4
MM-path example "
Source nodes ��� Sink nodes
MM-path"
MEP(C,1) = <1, 2, 4, 5>"MEP(C,2) = <1, 3, 4, 5>"
MEP(B,1) = <1, 2> "MEP(B,2) = <3, 4>"
MEP(A,1) = <1, 2, 3, 6>MEP(A,2) = <1, 2, 4>MEP(A,3) = <5, 6> "Module Execution Paths"
![Page 32: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/32.jpg)
IntP–32
MEPs and DD-paths"
What is the correspondence between MEPs and a DD-paths?!
![Page 33: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/33.jpg)
IntP–33
MEPs and DD-paths – 2"
There is no correspondence between MM execution paths and DD-paths!
![Page 34: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/34.jpg)
IntP–34
MEPs and slices"
What is the correspondence between MEPs and slices?"
![Page 35: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/35.jpg)
IntP–35
MEPs and slices – 2"
There is no correspondence but there is an analog ! The intersection of a module execution path with a
unit is the analog of a slice with respect to the MM-path function"
![Page 36: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/36.jpg)
IntP–36
MM-path graph "
What is an MM-path graph?"
![Page 37: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/37.jpg)
IntP–37
MM-path graph – 2 "
Given a set of units their MM-path graph is the directed graph in which! Nodes are module execution paths" Edges correspond to messages and returns from one
unit to another "
The definition is with respect to a set of units ! It directly supports composition of units and
composition-based integration testing "
![Page 38: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/38.jpg)
IntP–38
Solid lines indicate messages (calls)Dashed lines indicate returns from calls"
MM-path graph example"
MEP(C,2)""
MEP(A,1)""
MEP(A,2)""
MEP(A,3)""
MEP(B,1)""
MEP(C,1)""
MEP(B,2)""
![Page 39: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/39.jpg)
IntP–39
MM-path guidelines"
How long, or deep, is an MM-path? What determines the end points?!
Quiescence points are natural endpoints for MM-paths! Message quiescence" Data quiescence"
![Page 40: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/40.jpg)
IntP–40
Message quiescence"
Occurs when a unit that sends no messages is reached! Module C in the example"
![Page 41: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/41.jpg)
IntP–41
Data quiescence"
Occurs when a sequence of processing ends in the creation of stored data that is not immediately used! The causal path Data A has no quiescence" The non-causal path D1 and D2 is quiescent at the
node P-1"
![Page 42: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/42.jpg)
IntP–42
MM-path metric"
What is the minimum number of MM-paths that are sufficient to test a system?"
![Page 43: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/43.jpg)
IntP–43
MM-Path metric – 2"
What is the minimum number of MM-paths that are sufficient to test a system?! Should cover all source-to-sink paths in the set of
units "
What about loops? How should they be treated?"
![Page 44: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/44.jpg)
IntP–44
MM-Path metric – 3"
What is the minimum number of MM-paths that are sufficient to test a system?! Should cover all source-to-sink paths in the set of
units"
What about loops? How should they be treated?! Use condensation graphs to get directed acyclic
graphs" Avoids an excessive number of paths"
![Page 45: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/45.jpg)
IntP–45
Pros of path-based integration"
Benefits of hybrid of functional and structural testing! Functional – represent actions with input and output" Structural – how they are identified"
Avoids pitfall of structural testing! Unimplemented behaviours cannot be tested"
Fairly seamless union with system testing!
![Page 46: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/46.jpg)
IntP–46
Pros of path-based integration – 2"
Path-based integration is closely coupled with actual system behaviour! Works well with OO testing"
No need for stub and driver development!
![Page 47: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/47.jpg)
IntP–47
Cons of path-based integration"
There is a significant effort involved in identifying MM-paths!
![Page 48: Integration Testing Path Based - York University · 2011. 3. 8. · IntP–20 Path-Based Integration – 2" Motivation! Combine structural and behavioral type of testing for integration](https://reader036.fdocuments.us/reader036/viewer/2022071108/5fe27e444a11332ebe42247b/html5/thumbnails/48.jpg)
IntP–48
MM-path compared to other methods "
Strategy! Ability to testinterfaces!
Ability to testco-functionality!
Fault isolation resolution!
Functional decomposition!
Acceptable, can be deceptive!
Limited to pairs of units!
Good to faulty unit!
Call-graph! Acceptable! Limited to pairs of units!
Good to faulty unit!
MM-path! Excellent! Complete! Excellent to unit path level!