tailieunhanh - Lecture Software testing and analysis: Chapter 21 - Mauro Pezzè, Michal Young

Problems arise in integration even of well-designed modules and components. Integration testing aims to uncover interaction and compatibility problems as early as possible. This chapter presents integration testing strategies, including the increasingly important problem of testing integration with commercial off-the-shelf (COTS) components, libraries, and frameworks. | Integration and Component-based Software Testing (c) 2007 Mauro Pezzè & Michal Young Ch 21, slide 1 Learning objectives • Understand the purpose of integration testing – Distinguish typical integration faults from faults that should be eliminated in unit testing – Understand the nature of integration faults and how to prevent as well as detect them • Understand strategies for ordering construction and testing – Approaches to incremental assembly and testing to reduce effort and control risk • Understand special challenges and approaches for testing component-based systems (c) 2007 Mauro Pezzè & Michal Young Ch 21, slide 2 What is integration testing? Module test Integration test System test Module interface Interface specs, module breakdown Requirements specification Visible structure: Coding details Modular structure (software architecture) — none — Scaffolding required: Often extensive Some Interactions, compatibility System functionality Specification: Some Looking for faults Modules in: (c) 2007 Mauro Pezzè & Michal Young Ch 21, slide 3 Integration versus Unit Testing • Unit (module) testing is a necessary foundation – Unit level has maximum controllability and visibility – Integration testing can never compensate for inadequate unit testing • Integration testing may serve as a process check – If module faults are revealed in integration testing, they signal inadequate unit testing – If integration faults occur in interfaces between correctly implemented modules, the errors can be traced to module breakdown and interface specifications (c) 2007 Mauro Pezzè & Michal Young Ch 21, slide 4 Integration Faults • Inconsistent interpretation of parameters or values – Example: Mixed units (meters/yards) in Martian Lander • Violations of value domains, capacity, or size limits – Example: Buffer overflow • Side effects on parameters or resources – Example: Conflict on (unspecified) temporary file • Omitted or misunderstood .