1 / 19

Integration Testing

Integration Testing. CS 4311 I. Burnstein. Practical Software Testing , Springer-Verlag, 2003. 1. Hierarchy of Testing. Testing. Ad Hoc. Program Testing. System Testing. Acceptance Testing. Unit Testing. Integration Testing. Function. Benchmark. Properties. Black Box. Top Down.

kolina
Download Presentation

Integration Testing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Integration Testing CS 4311 I. Burnstein. Practical Software Testing, Springer-Verlag, 2003. 1

  2. Hierarchy of Testing Testing Ad Hoc Program Testing System Testing Acceptance Testing Unit Testing Integration Testing Function Benchmark Properties Black Box Top Down Pilot Performance Equivalence Bottom Up Reliability Alpha Boundary Big Bang Availability Decision Table Beta Sandwich Security State Transition Usability Use Case Documentation Domain Analysis Portability White Box Capacity Control Flow Data Flow

  3. Outline • Big bang • Top-down • Bottom-up • Sandwich • Regression 3 3

  4. In Class • Suppose you have constructed and tested all of the units. • What are the possible things you can do next?

  5. Review: Test Procedures Driver Module to be tested Results Test cases Stub Stub

  6. Integration Testing • Assumes the units have been tested individually • Tests units working together • Identifies errors in the interfaces between units • Approaches • Big bang • Top-down • Bottom-up • Sandwich

  7. Big-bang Integration • Test all components in isolation, then mix them all together and see how it works. • As all components are merged at once, it is difficult to identify the cause of a failure. • Q: Need test drivers and stubs for big-bang testing?

  8. Top-Down Integration Testing • Modules are integrated by moving downward through control hierarchy. • Modules subordinate to main control module are incorporated • Depth-first • Breadth-first M1 M2 M3 M4 M5 M6 M7 M8 Pairs: What get’s tested first in breadth first?

  9. Top-Down Integration Testing • In Top Down, Breadth First • M1 tested with stubs for M2, M3 and M4 • Then M1-M2 tested with stubs for M3, M4, M5, and M6 • Then M1-M2-M3 tested with stubs for M4, M5, M6, and M7 • … M1 M2 M3 M4 M5 M6 M7 M8 9

  10. Steps in Top-Down Integration Testing • The main module is used as a test driver • Stubs are substituted for all components directly subordinate to the main control module • Stubs are replaced one at a time with actual components • Tests are conducted as each component is integrated.

  11. Evaluation of Top-Down Strategy • Verifies major control or decision early in the test process • Allows early recognition of major problems • Depth first strategy allows a complete function of the software to be implemented • Stubs replace lower-level modules so no significant data can flow upward • Delay some tests until have actual modules • Add code to simulate module

  12. Bottom-Up Integration • Low-level components are combined into clusters • A driver is written to coordinate test case input and output • Cluster is tested • Drivers are removed and clusters are combined moving upward in program structure.

  13. Bottom Up Integration Testing In Bottom Up: M1 M2 M3 M4 M5 M6 M7 M8 Pairs: What get’s tested first?

  14. Bottom Up Integration Testing In Bottom Up: • M8 tested with drivers • M5-M8 is tested with drivers for M5 • M5-M6-M8 is tested with drivers for M5-M6 • … M1 M2 M3 M4 M5 M6 M7 M8 14

  15. Evaluation of Bottom-Up Strategy • Need for stubs is eliminated • Operational modules tested thoroughly • Begins construction and testing with atomic modules

  16. Sandwich Integration • Combination of bottom-up and top-down integrations • System is viewed as layers • Approach 1: • Top-down approach is used for the top layer • A bottom-up approach is used for the bottom layer • Allows integration to begin early in the testing phase • Does not test individual components thoroughly before integration

  17. Sandwich integration (Cont.) • Approach 2: • Start with a layer in the middle • Use drivers to and stubs to check • Work out from middle • Allows integration to begin early in the testing phase • Does not test individual components thoroughly before integration

  18. Regression Testing • Adding new or changing module impacts the system • New data flow paths established • New I/O may occur • New control logic invoked • Regression testing is re-execution of subset of tests that have already been conducted • Ensures changes have not propagated unintended side effects

  19. Regression Test (Cont.) • Approaches • Manual testing • Capture/Playback tools: capture test cases and results for subsequent playback and comparison • Test suite contains following classes of test cases: • Representative sample of tests that exercises all software functions • Focus on functions likely affected by change • Focus on components that have been changed

More Related