Integration Testing Beyond unit testing. 2 Testing in the V-Model Requirements Detailed Design Module implementation Unit test Integration test System.

Slides:



Advertisements
Similar presentations
Defect testing Objectives
Advertisements

Presentation by Prabhjot Singh
1 Integration Testing CS 4311 I. Burnstein. Practical Software Testing, Springer-Verlag, 2003.
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 11: Integration- and System Testing.
Software Integration Testing Speaker: Jerry Gao Ph.D. San Jose State University URL:
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
Integration testing Satish Mishra
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
Software Testing and Quality Assurance
Strategic Approach to Testing
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Integration Testing Presented By Nesreen Ahmad. *Main Points:-  Definition Of Integration Testing.  Procedure Of Integration Testing.  Integration.
CS 425/625 Software Engineering Software Testing
INTEGRATION TESTING ● After or during Unit Testing ● Putting modules together in a controlled way to incrementally build up the final system. ● Start with.
Outline Types of errors Component Testing Testing Strategy
SE-565 Software System Requirements More UML Diagrams.
Program unit A Program unit B Program unit T Function 1 Function 2 Function Component 1 Whole System (e.g. regression testing) Component 3....
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 11: Integration- and System Testing.
Software Testing & Strategies
Software System Integration
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
ECE 355: Software Engineering
Chapter 7 Unit Testing & Integration Testing Software Testing By Wararat Songpan(Rungworawut),PH.D. Department of Computer Science, Faculty of.
Overview Integration Testing Decomposition Based Integration
SOFTWARE TESTING STRATEGIES CIS518001VA : ADVANCED SOFTWARE ENGINEERING TERM PAPER.
Different Levels of Testing
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
CMSC 345 Fall 2000 Unit Testing. The testing process.
INT-Evry (Masters IT– Soft Eng)IntegrationTesting.1 (OO) Integration Testing What: Integration testing is a phase of software testing in which.
1 Software testing. 2 Testing Objectives Testing is a process of executing a program with the intent of finding an error. A good test case is in that.
Architecture styles Pipes and filters Object-oriented design Implicit invocation Layering Repositories.
Ch6: Software Verification. 1 Decision table based testing  Applicability:  Spec. is described by a decision table.  Tables describe:  How combinations.
Software Testing. 2 CMSC 345, Version 4/12 Topics The testing process  unit testing  integration and system testing  acceptance testing Test case planning.
Interaction Models (2): Sequence Diagrams Extracted from textbook: Object Oriented Modeling and Design with UML M. Blaha, J. Rumbaugh 1.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Chapter 13 Integration Testing. The Mars Climate Orbiter Mission mission failed in September 1999 completed successful flight: 416,000,000 miles (
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
System Testing Beyond unit testing. 2 System Testing Of the three levels of testing, system level testing is closest to everyday experience We evaluate.
1 Integration Testing CS 4311 I. Burnstein. Practical Software Testing, Springer-Verlag, 2003.
CSC 480 Software Engineering Test Planning. Test Cases and Test Plans A test case is an explicit set of instructions designed to detect a particular class.
ISBN Prentice-Hall, 2006 Chapter 8 Testing the Programs Copyright 2006 Pearson/Prentice Hall. All rights reserved.
CS451 Lecture 10: Software Testing Yugi Lee STB #555 (816)
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
CS451 Software Implementation and Integration Yugi Lee STB #555 (816) Note: This lecture was designed.
What is a level of test?  Defined by a given Environment  Environment is a collection of people, hard ware, software, interfaces, data etc.
Systems Design.  Application Design  User Interface Design  Database Design.
1 Software Testing & Quality Assurance Lecture 15 Created by: Paulo Alencar Modified by: Frank Xu.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Chapter 8 Testing the Programs. Integration Testing  Combine individual comp., into a working s/m.  Test strategy gives why & how comp., are combined.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
ANOOP GANGWAR 5 TH SEM SOFTWARE TESTING MASTER OF COMPUTER APPLICATION-V Sem.
Defect testing Testing programs to establish the presence of system defects.
Lec 10 Integration Testing- 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 10 – Integration Testing 9/30/
Software Testing.
Integration Testing.
Software Testing.
Integration Testing This is the step after the individual pieces of code or modules (programs) are tested. A set of programs do not exist in vacuum. They.
Levels Of Testing and Special Tests
Higher-Level Testing and Integration Testing
Chapter 13 Integration Testing
Software testing.
Different Levels of Testing
Integration Testing CS 4311
Chapter 13 Integration Testing.
Integration Testing.
Chapter 11: Integration- and System Testing
Chapter 11: Integration and System Testing
CS410 – Software Engineering Lecture #11: Testing II
Presentation transcript:

Integration Testing Beyond unit testing

2 Testing in the V-Model Requirements Detailed Design Module implementation Unit test Integration test System test Acceptance test Run tests Write tests Customer Developer Functional (BB) Structural (WB) Architectural Design

3 Unit testing Testing of individual components Integration testing Testing to expose problems arising from the combination of components System testing Testing the complete system prior to delivery Acceptance testing Testing by users to check that the system satisfies requirements. Sometimes called alpha testing Testing stages

4 Layered Tests /

5 Integration Testing Testing the interfaces and interactions among separately tested units Three different approaches Based on functional decomposition Based on call graph Based on paths

6 Functional Decomposition Functional Decomposition is defined as a method in which a problem is broken up into several independent task units, or functions, which can be run either sequentially and in a synchronous call-reply manner or simultaneously on different processors This method is used during planning, analysis and design, and creates a functional hierarchy for the software

7 Example functional decomposition

8 Top-Down Integration Top-down integration strategy focuses on testing the top layer or the controlling subsystem first (i.e. the main, or the root of the call tree) The general process in top-down integration strategy is to gradually add more subsystems that are referenced/required by the already tested subsystems when testing the application Do this until all subsystems are incorporated into the test

9 Top-Down Integration Special code is needed to do the testing Test stub A program or a method that simulates the input-output functionality of a missing subsystem by answering to the decomposition sequence of the calling subsystem and returning back simulated data

11 Top-Down Integration Issues 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 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 needed

12 Bottom-Up Integration Bottom-Up integration strategy focuses on testing the units at the lowest levels first Gradually includes the subsystems that reference/require the previously tested subsystems This is done repeatedly until all subsystems are included in the testing Special driver code is needed to do the testing The driver is a “fake” routine that requires a subsystem and passes a test case to it

Bottom-Up Integration Top Subtree (Sessions 29-32) Second Level Subtree (Sessions 25-28) Bottom Level Subtree (Sessions 13-17)

14 Bottom-Up Integration Issues Not optimal strategy for functionally decomposed systems: Tests the most important subsystem (UI) last More useful for integrating object-oriented systems Drivers may be more complicated than stubs Less drivers than stubs are typically required

15 Sandwich Integration Combines top-down strategy with bottom-up strategy Less stub and driver development effort Added difficulty in fault isolation

17 Call Graph-Based Integration The basic idea is to use the call graph instead of the decomposition tree The call graph is a directed, labeled graph Two types of call graph based integration testing Pair-wise Integration Testing Neighborhood Integration Testing

19 Pair-Wise Integration The idea behind Pair-Wise integration testing is to eliminate the need for developing stubs/drivers The objective is to use actual code instead of stubs/drivers In order not to deteriorate the process to a big-bang strategy, we restrict a testing session to just a pair of units in the call graph The result is that we have one integration test session for each edge in the call graph

21 Neighbourhood Integration We define the neighbourhood of a node in a graph to be the set of nodes that are one edge away from the given node In a directed graph means all the immediate predecessor nodes and all the immediate successor nodes of a given node Neighborhood Integration Testing reduces the number of test sessions Fault isolation is harder

23 Pros and Cons of Call-Graph Integration Call graph based integration techniques move towards a behavioral basis Aim to eliminate / reduce the need for drivers/stubs Closer to a build sequence Neighborhoods can be combined to create “villages” Suffer from the fault isolation problem especially for large neighborhoods Nodes can appear in several neighborhoods

24 Path-Based Integration The basic motivation is to combine structural and behavioral type of testing for integration testing as we did for unit testing The basic idea is to focus on interactions among system units rather than merely to test interfaces among separately developed and tested units In this respect, interface-based testing is structural while interaction-based is behavioral

25 Extended Concepts (1) Source node: a program statement fragment at which program execution begins or resumes. for example the first “begin” statement in a program. also, immediately after nodes that transfer control to other units. 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.

26 Extended Concepts (2) Module execution path: a sequence of statements that begins with a source node and ends with a sink node with no intervening sink nodes. Message: a programming language mechanism by which one unit transfers control to another unit. usually interpreted as subroutine invocations the unit which receives the message always eventually returns control to the message source.

27 MM-Paths MM-Path: an interleaved sequence of module execution paths and messages. we can describe 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.

A B C In module A nodes 1 and 5 are source nodes while nodes 4 and 6 are sink nodes. and are module execution paths An MM-path is shown in bold MM-Path Example

29 The complete list of module execution paths: MEP(A,1) = MEP(B,1) = MEP(A,2) = MEP(B,2) = MEP(A,3) = MEP(C,1) = MEP(C,2) = Module execution paths

30 MM-Path Graph 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

31 MEP(A,2) MEP(B,1) MEP(C,1) MEP(B,2) MEP(A,3) MEP(A,1) MEP(C,2) The MM-Path graph for our example. The solid arrows indicate messages and the corresponding returns are indicated by dotted arrows. MM-Path Graph Example

32 Pros and cons of path-based integration Path-based integration is closely coupled with actual system behaviour There is a significant effort involved in identifying MM-Paths No need for stub and driver development