logging in or signing up INTEGRATION TESTING viki001 Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 2066 Category: Science & Tech.. License: All Rights Reserved Like it (0) Dislike it (0) Added: February 02, 2011 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Integration testing: 1 Integration testingTesting: 2 Testing What is the overall goal of testing? What claims can we make when testing "passes" or "fails" ? Can we prove that our code has no bugs? testing : systematic attempt to reveal the presence of errors (to "falsify" system) accomplished by exercising defects in the system and revealing problems failed test: an error was demonstrated passed test: no error was found, so far not used to show absence of errors in software does not directly reveal the actual bugs in the codeThe Concept of Integration Testing: The Concept of Integration Testing A software module is a self-contained element of a system Modules are individually tested commonly known as unit testing Next major task is to put the modules, i.e., pieces together to construct the complete system The objective of system integration testing (SIT) is to build a “working” version of the system Putting modules together in an incremental manner Ensuring that the additional modules work as expected without disturbing the functionalities of the modules already put together Integration testing is said to be complete when The system is fully integrated togethr All the test cases have been executed All the severe and moderated defects found have been fixed 3The Concept of Integration Testing: The Concept of Integration Testing The major advantages of conducting SIT are as follows: Defects are detected early It is easier to fix defects detected earlier We get earlier feedback on the health and acceptability of the individual modules and on the overall system Scheduling of defect fixes is flexible, and it can overlap with development 4Steps in Integration-Testing: Steps in Integration-Testing . 1. Based on the integration strategy, select a component to be tested. Unit test all the classes in the component. 2. Put selected component together; do any preliminary fix-up necessary to make the integration test operational (drivers, stubs) 3. Do functional testing: Define test cases that exercise all uses cases with the selected component 4. Do structural testing: Define test cases that exercise the selected component 5. Execute performance tests 6. Keep records of the test cases and testing activities. 7. Repeat steps 1 to 7 until the full system is tested. The primary goal of integration testing is to identify errors in the (current) component configuration.Which Integration Strategy should you use?: Which Integration Strategy should you use ? Factors to consider Amount of test harness (stubs &drivers) Location of critical parts in the system Availability of hardware Availability of components Scheduling concerns Bottom up approach good for object oriented design methodologies Test driver interfaces must match component interfaces ... ...Top-level components are usually important and cannot be neglected up to the end of testing Detection of design errors postponed until end of testing Top down approach Test cases can be defined in terms of functions examined Need to maintain correctness of test stubs Writing stubs can be difficultSystem Integration Techniques: System Integration Techniques Common approaches to perform system integration testing Top-down (from higher levels no test drivers are needed) Bottom-up (from lower levels No test stubs necessary ) Sandwich (combination of bottom-up and top-down no test stubs and drivers needed) Big-bang (all components together) Pre-requisite A module must be available to be integrated A module is said to available for combining with other modules when the module’s check-in request form is ready 7Check-in Request Form: Check-in Request Form 8Incremental integration testing: Incremental integration testingIntegration Testing: Big-Bang Approach: Integration Testing: Big-Bang Approach Unit Test F Unit Test E Unit Test D Unit Test C Unit Test B Unit Test A System Test BIG BANG : BIG BANG Intent – demonstrate stability by attempting to exercise an entire system with a few test runs Context – bring all components together all at once. All interfaces tested in one go. – usually ends in ‘big-bang’ – system dies miserably… Entry criteria – all components have passed unit testing Exit criteria – Test suite passes 11BIG BANG: BIG BANG Consequences – Fails – then what? Failure diagnosis is very difficult. – Even if exit criteria met, many interface faults can still hide. 12Bottom Up: Bottom Up Entry criteria – components pass unit tests Exit criteria – interface for each subcomponent has been exercised at least once – complete when all root-level components pass test suites 13 Bottom-up Integration: Bottom-up Integration A B C D G F E Layer I Layer II Layer III Test F Test E Test G Test C Test D,G Test B, E, F Test A, B, C, D, E, F, G Pros and Cons of bottom up integration testing: Pros and Cons of bottom up integration testing Bad for functionally decomposed systems: Tests the most important subsystem (UI) last Useful for integrating the following systems Object-oriented systems real-time systems systems with strict performance requirementsTop-down Testing Strategy: Top-down Testing Strategy Test the top layer or the controlling subsystem first Then combine all the subsystems that are called by the tested subsystems and test the resulting collection of subsystems Do this until all subsystems are incorporated into the test Special program is needed to do the testing, Test stub : A program or a method that simulates the activity of a missing subsystem by answering to the calling sequence of the calling subsystem and returning back fake data.Top-down Integration Testing: Top-down Integration Testing A B C D G F E Layer I Layer II Layer III Test A Layer I Test A, B, C, D Layer I + II Test A, B, C, D, E, F, G All LayersPros and Cons of top-down integration testing: Pros and Cons of top-down integration testing Test cases can be defined in terms of the functionality of the system (functional requirements) Writing stubs can be difficult: 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 methods. One solution to avoid too many stubs: Modified top-down testing strategy Test each layer of the system decomposition individually before merging the layers Disadvantage of modified top-down testing: Both, stubs and drivers are neededSandwich Testing Strategy: Sandwich Testing Strategy Combines top-down strategy with bottom-up strategy The system is view as having three layers A target layer in the middle A layer above the target A layer below the target Testing converges at the target layer How do you select the target layer if there are more than 3 layers? Heuristic: Try to minimize the number of stubs and driversSandwich Testing Strategy: Sandwich Testing Strategy A B C D G F E Layer I Layer II Layer III Test E Test D,G Test B, E, F Test A, B, C, D, E, F, G Test F Test G Test A Bottom Layer Tests Top Layer Tests Test A,B,C, DPros and Cons of Sandwich Testing: Pros and Cons of Sandwich Testing Top and Bottom Layer Tests can be done in parallel Does not test the individual subsystems thoroughly before integration Solution: Modified sandwich testing strategyTest Plan for System Integration: 22 Test Plan for System IntegrationTest Plan for System Integration: 23 Test Plan for System Integration Table 7.4: A framework for system integration entry criteriaTest Plan for System Integration: 24 Test Plan for System Integration Table 7.5: A framework for system integration exit criteriaTHANK YOU: THANK YOU 25 You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
INTEGRATION TESTING viki001 Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 2066 Category: Science & Tech.. License: All Rights Reserved Like it (0) Dislike it (0) Added: February 02, 2011 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Integration testing: 1 Integration testingTesting: 2 Testing What is the overall goal of testing? What claims can we make when testing "passes" or "fails" ? Can we prove that our code has no bugs? testing : systematic attempt to reveal the presence of errors (to "falsify" system) accomplished by exercising defects in the system and revealing problems failed test: an error was demonstrated passed test: no error was found, so far not used to show absence of errors in software does not directly reveal the actual bugs in the codeThe Concept of Integration Testing: The Concept of Integration Testing A software module is a self-contained element of a system Modules are individually tested commonly known as unit testing Next major task is to put the modules, i.e., pieces together to construct the complete system The objective of system integration testing (SIT) is to build a “working” version of the system Putting modules together in an incremental manner Ensuring that the additional modules work as expected without disturbing the functionalities of the modules already put together Integration testing is said to be complete when The system is fully integrated togethr All the test cases have been executed All the severe and moderated defects found have been fixed 3The Concept of Integration Testing: The Concept of Integration Testing The major advantages of conducting SIT are as follows: Defects are detected early It is easier to fix defects detected earlier We get earlier feedback on the health and acceptability of the individual modules and on the overall system Scheduling of defect fixes is flexible, and it can overlap with development 4Steps in Integration-Testing: Steps in Integration-Testing . 1. Based on the integration strategy, select a component to be tested. Unit test all the classes in the component. 2. Put selected component together; do any preliminary fix-up necessary to make the integration test operational (drivers, stubs) 3. Do functional testing: Define test cases that exercise all uses cases with the selected component 4. Do structural testing: Define test cases that exercise the selected component 5. Execute performance tests 6. Keep records of the test cases and testing activities. 7. Repeat steps 1 to 7 until the full system is tested. The primary goal of integration testing is to identify errors in the (current) component configuration.Which Integration Strategy should you use?: Which Integration Strategy should you use ? Factors to consider Amount of test harness (stubs &drivers) Location of critical parts in the system Availability of hardware Availability of components Scheduling concerns Bottom up approach good for object oriented design methodologies Test driver interfaces must match component interfaces ... ...Top-level components are usually important and cannot be neglected up to the end of testing Detection of design errors postponed until end of testing Top down approach Test cases can be defined in terms of functions examined Need to maintain correctness of test stubs Writing stubs can be difficultSystem Integration Techniques: System Integration Techniques Common approaches to perform system integration testing Top-down (from higher levels no test drivers are needed) Bottom-up (from lower levels No test stubs necessary ) Sandwich (combination of bottom-up and top-down no test stubs and drivers needed) Big-bang (all components together) Pre-requisite A module must be available to be integrated A module is said to available for combining with other modules when the module’s check-in request form is ready 7Check-in Request Form: Check-in Request Form 8Incremental integration testing: Incremental integration testingIntegration Testing: Big-Bang Approach: Integration Testing: Big-Bang Approach Unit Test F Unit Test E Unit Test D Unit Test C Unit Test B Unit Test A System Test BIG BANG : BIG BANG Intent – demonstrate stability by attempting to exercise an entire system with a few test runs Context – bring all components together all at once. All interfaces tested in one go. – usually ends in ‘big-bang’ – system dies miserably… Entry criteria – all components have passed unit testing Exit criteria – Test suite passes 11BIG BANG: BIG BANG Consequences – Fails – then what? Failure diagnosis is very difficult. – Even if exit criteria met, many interface faults can still hide. 12Bottom Up: Bottom Up Entry criteria – components pass unit tests Exit criteria – interface for each subcomponent has been exercised at least once – complete when all root-level components pass test suites 13 Bottom-up Integration: Bottom-up Integration A B C D G F E Layer I Layer II Layer III Test F Test E Test G Test C Test D,G Test B, E, F Test A, B, C, D, E, F, G Pros and Cons of bottom up integration testing: Pros and Cons of bottom up integration testing Bad for functionally decomposed systems: Tests the most important subsystem (UI) last Useful for integrating the following systems Object-oriented systems real-time systems systems with strict performance requirementsTop-down Testing Strategy: Top-down Testing Strategy Test the top layer or the controlling subsystem first Then combine all the subsystems that are called by the tested subsystems and test the resulting collection of subsystems Do this until all subsystems are incorporated into the test Special program is needed to do the testing, Test stub : A program or a method that simulates the activity of a missing subsystem by answering to the calling sequence of the calling subsystem and returning back fake data.Top-down Integration Testing: Top-down Integration Testing A B C D G F E Layer I Layer II Layer III Test A Layer I Test A, B, C, D Layer I + II Test A, B, C, D, E, F, G All LayersPros and Cons of top-down integration testing: Pros and Cons of top-down integration testing Test cases can be defined in terms of the functionality of the system (functional requirements) Writing stubs can be difficult: 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 methods. One solution to avoid too many stubs: Modified top-down testing strategy Test each layer of the system decomposition individually before merging the layers Disadvantage of modified top-down testing: Both, stubs and drivers are neededSandwich Testing Strategy: Sandwich Testing Strategy Combines top-down strategy with bottom-up strategy The system is view as having three layers A target layer in the middle A layer above the target A layer below the target Testing converges at the target layer How do you select the target layer if there are more than 3 layers? Heuristic: Try to minimize the number of stubs and driversSandwich Testing Strategy: Sandwich Testing Strategy A B C D G F E Layer I Layer II Layer III Test E Test D,G Test B, E, F Test A, B, C, D, E, F, G Test F Test G Test A Bottom Layer Tests Top Layer Tests Test A,B,C, DPros and Cons of Sandwich Testing: Pros and Cons of Sandwich Testing Top and Bottom Layer Tests can be done in parallel Does not test the individual subsystems thoroughly before integration Solution: Modified sandwich testing strategyTest Plan for System Integration: 22 Test Plan for System IntegrationTest Plan for System Integration: 23 Test Plan for System Integration Table 7.4: A framework for system integration entry criteriaTest Plan for System Integration: 24 Test Plan for System Integration Table 7.5: A framework for system integration exit criteriaTHANK YOU: THANK YOU 25