Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the...
Transcript of Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the...
![Page 1: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/1.jpg)
Integration TestingFunctional Decomposition Based
Chapter 13
![Page 2: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/2.jpg)
IntF–2
Integration Testing
Test the interfaces and interactions among separatelytested units
Three different approaches Based on functional decomposition Based on call graphs Based on paths
![Page 3: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/3.jpg)
IntF–3
Functional Decomposition
Functional Decomposition Create a functional hierarchy for the software Problem is broken up into independent task units, or
functions Units can be run either
Sequentially and in a synchronous call-replymanner
Or simultaneously on different processors
Used during planning, analysis and design
![Page 4: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/4.jpg)
IntF–4
SATM Units
1 1 SATM systemA 1.1 Device sense & controlD 1.1.1 Door sense & control2 1.1.1.1 Get door status3 1.1.1.2 Control door4 1.1.1.3 Dispense cashE 1.1.2 Slot sense & control5 1.1.2.1 Watch card slot6 1.1.2.2 Get deposit slot status7 1.1.2.3 Control card Roller8 1.1.2.4 Control Envelope Roller9 1.1.2.5 Read card strip10 1.2 Central bank comm.11 1.2.1 Get PIN for PAN12 1.2.2 Get account status13 1.2.3 Post daily transactionsB 1.3 Terminal sense & control
14 1.3.1 Screen door15 1.3.2 Key sensorC 1.4 Manage session16 1.4.1 Validate card17 1.4.2 Validate PIN18 1.4.2.1 Get PINF 1.4.3 Close session19 1.4.3.1 New transaction request20 1.4.3.2 Print receipt21 1.4.3.3 Post transaction local22 1.4.4 Manage transaction23 1.4.4.1 Get transaction type24 1.4.4.2 Get account type25 1.4.4.3 Report balance26 1.4.4.4 Process deposit27 1.4.4.5 Process withdrawal
Unit Level Name Unit Level Name
![Page 5: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/5.jpg)
IntF–5
Functional Decomposition of the SATM System
1
A 10 B
D E 11 12 13 14 15
2 3 4 5 6 7 8 9
C
16 17 F 22
18 19 20 21 23 24 25 26 27
Table 1: SATM Units and Abbreviated NamesUnit Level Unit Name1! 1! SATM SystemA! 1.1! Device Sense & ControlD! 1.1.1! Door Sense & Control2! 1.1.1.1 ! Get Door Status3! 1.1.1.2 ! Control Door4! 1.1.1.3 ! Dispense CashE! 1.1.2! Slot Sense & Control5! 1.1.2.1 ! WatchCardSlot 6! 1.1.2.2 ! Get Deposit Slot Status7! 1.1.2.3 ! Control Card Roller8! 1.1.2.3 ! Control Envelope Roller9! 1.1.2.5 ! Read Card Strip10! 1.2! Central Bank Comm.11! 1.2.1! Get PIN for PAN12! 1.2.2! Get Account Status13! 1.2.3! Post Daily Transactions
Unit Level Unit NamB! 1.3! Terminal Sense & Control14! 1.3.1! Screen Driver15! 1.3.2! Key SensorC! 1.4! Manage Session16! 1.4.1 ! Validate Card17! 1.4.2! Validate PIN18! 1.4.2.1 ! GetPINF! 1.4.3 ! Close Session19! 1.4.3.1 ! New Transaction Request20! 1.4.3.2 ! Print Receipt21! 1.4.3.3 ! Post Transaction Local22! 1.4.4! Manage Transaction23! 1.4.4.1 ! Get Transaction Type24! 1.4.4.2 ! Get Account Type25! 1.4.4.3 ! Report Balance26! 1.4.4.4 ! Process Deposit27! 1.4.4.5 ! Process Withdrawal
SATM functional decomposition tree
![Page 6: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/6.jpg)
IntF–6
Decomposition-based integration strategies
What are the decomposition-based integrationstrategies?
![Page 7: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/7.jpg)
IntF–7
Decomposition-based integration strategies – 2
Top-down
Bottom-up
Sandwich
Big bang
![Page 8: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/8.jpg)
IntF–8
Big bang integration process
What is the big bang integration process.
![Page 9: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/9.jpg)
IntF–9
Big bang integration process – 2
All units are compiled together
All units are tested together
![Page 10: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/10.jpg)
IntF–10
Big bang integration issues
What are the issues (advantages and drawbacks)?
![Page 11: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/11.jpg)
IntF–11
Big bang integration issues – 2
Failures will occur!
No clues to isolate location of faults
No stubs or drivers to write
![Page 12: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/12.jpg)
IntF–12
Top-down integration
What is the top-down integration process?
![Page 13: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/13.jpg)
IntF–13
Top SubtreeSessions 1-4
Second Level SubtreeSessions 5-8
Bottom Level Subtree Sessions 9-13
Top-Down integration example
![Page 14: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/14.jpg)
IntF–14
Top-Down integration process
Strategy Focuses on testing the top layer or the controlling
subsystem first The main, or the root of the call tree
General process is To gradually add more subsystems that are
referenced/required by the already tested subsystemswhen testing the application
Do this until all subsystems are incorporated into thetest
![Page 15: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/15.jpg)
IntF–15
Top-Down integration process – 2
Stubs are needed to do the testing
A program or a method that simulates the input-outputfunctionality of a missing subsystem by answering tothe decomposition sequence of the calling subsystemand returning back simulated data
![Page 16: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/16.jpg)
IntF–16
Top-Down integration issues
What are the issues?
![Page 17: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/17.jpg)
IntF–17
Top-Down integration issues – 2
Writing stubs can be difficult Especially when parameter passing is complex. Stubs must allow all possible conditions to be tested
Possibly a very large number of stubs may be required Especially if the lowest level of the system contains
many functional units
![Page 18: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/18.jpg)
IntF–18
Top-Down integration issues – 3
One solution to avoid too many stubs Modified top-down testing strategy
Test each layer of the system decompositionindividually before merging the layers
Disadvantage of modified top-down testing Both stubs and drivers are needed
![Page 19: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/19.jpg)
IntF–19
Bottom-up integration
What is the bottom-up integration process?
![Page 20: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/20.jpg)
IntF–20
Bottom-up integration example
Top SubtreeSessions 10-13
Second Level SubtreeSessions 6-9
Bottom Level SubtreeSessions 1-5
![Page 21: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/21.jpg)
IntF–21
Bottom-Up integration process
Bottom-Up integration strategy Focuses on testing the units at the lowest levels first
Gradually includes the subsystems thatreference/require the previously tested subsystems
Do until all subsystems are included in the testing
![Page 22: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/22.jpg)
IntF–22
Bottom-Up integration process – 2
Drivers are needed to do the testing
A driver is a specialized routine that passes test casesto a subsystem
Subsystem is not everything below current rootmodule, but a sub-tree down to the leaf level
![Page 23: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/23.jpg)
IntF–23
Bottom-up integration issues
What are the issues?
![Page 24: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/24.jpg)
IntF–24
Bottom-Up Integration Issues
Not an optimal strategy for functionally decomposedsystems Tests the most important subsystem (user interface)
last
More useful for integrating object-oriented systems
Drivers may be more complicated than stubs
Less drivers than stubs are typically required
![Page 25: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/25.jpg)
IntF–25
Sandwich integration
What is the sandwich integration process?
![Page 26: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/26.jpg)
IntF–26
Sandwich integration example
Sandwich 1Sessions 1-3
Sandwich 2Sessions 4-13
Sandwich 3Sessions 14-15
![Page 27: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/27.jpg)
IntF–27
Sandwich integration process
Combines top-down strategy with bottom-up strategy
Doing big bang on a subtree
![Page 28: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/28.jpg)
IntF–28
Sandwich integration issues
What are the issues?
![Page 29: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/29.jpg)
IntF–29
Sandwich integration issues – 2
Less stub and driver development effort
Added difficulty in fault isolation
![Page 30: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/30.jpg)
IntF–30
Integration test session
A session is a test suite that tests one edge in the tree Each session tests the combining of two parts
This is different from the textbook
#sessions = #edges
#sessions = #nodes – #leaves + #edges = 2 #edges – #leaves + 1
Alternately
#sessions = #internal_nodes + #edges
![Page 31: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/31.jpg)
IntF–31
Integration work numbers
For top-down integration #nodes – 1 = #edges stubs are needed
For bottom-up integration #nodes – #leaves = #internal_nodes
drivers are needed
The number integrated units for top-down and bottom-up
#integrated_units = #internal_nodes
![Page 32: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/32.jpg)
IntF–32
Integration work numbers
For SATM have 32 integration test sessions Correspond to 32 separate sets of test cases
For top-down integration 32 stubs are needed
For bottom-up integration 10 drivers are needed
For top-down and bottom-up 10 integration units
![Page 33: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/33.jpg)
IntF–33
Decomposition-based drawback
What is the major drawback of decomposition-basedintegration?
![Page 34: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/34.jpg)
IntF–34
Decomposition-based drawback – 2
It is functionally based Has the problems of all functional testing
How do we overcome the problems?
![Page 35: Integration Testing Functional Decomposition Based€¦ · the decomposition sequence of the calling subsystem and returning back simulated data. IntF–16 Top-Down integration issues](https://reader034.fdocuments.in/reader034/viewer/2022042500/5f4795007f501e0e01118a9b/html5/thumbnails/35.jpg)
IntF–35
Decomposition-based drawback – 3
It is functionally based Has the problems of all functional testing
How do we overcome the problems? Move to structural-based testing