2006-2007INT-Evry (Masters IT– Soft Eng)IntegrationTesting.1 (OO) Integration Testing What: Integration testing is a phase of software testing in which.

Slides:



Advertisements
Similar presentations
Chapter 11, Testing, Part 2: Integration and System Testing
Advertisements

1 Integration Testing CS 4311 I. Burnstein. Practical Software Testing, Springer-Verlag, 2003.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 11: Integration- and System Testing.
Integration testing Satish Mishra
Integration Testing Presented By Nesreen Ahmad. *Main Points:-  Definition Of Integration Testing.  Procedure Of Integration Testing.  Integration.
Illinois Institute of Technology
Software Engineering Software Testing.
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.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Software Engineering October 31, 2001 Testing.
- Testing programs to establish the presence of system defects -
SDLC. Information Systems Development Terms SDLC - the development method used by most organizations today for large, complex systems Systems Analysts.
Outline Types of errors Component Testing Testing Strategy
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 11: Integration- and System Testing.
Software Testing & Strategies
Issues on Software Testing for Safety-Critical Real-Time Automation Systems Shahdat Hossain Troy Mockenhaupt.
Bottom-Up Integration Testing After unit testing of individual components the components are combined together into a system. Bottom-Up Integration: each.
Software System Integration
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22Slide 1 Verification and Validation u Assuring that a software system meets a user's.
Testing Chapter 11. Dealing with Errors Verification: –Makes assumptions –Doesn’t always deal with real environment Testing (this lecture) –Testing is.
Testing. Outline Terminology Types of errors Dealing with errors Quality assurance vs Testing Component Testing Unit testing Integration testing Testing.
ECE 355: Software Engineering
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 9, Testing.
Overview Integration Testing Decomposition Based Integration
CMSC 345 Fall 2000 Unit Testing. The testing process.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 11, Testing.
Testing Basics of Testing Presented by: Vijay.C.G – Glister Tech.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Software Construction Lecture 18 Software Testing.
TESTING LEVELS Unit Testing Integration Testing System Testing Acceptance Testing.
Intro to S/W Engg Software Testing. Terminology  Reliability: The measure of success with which the observed behavior of a system confirms to some specification.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Terminology  Reliability: The measure of.
CSC 480 Software Engineering Lecture 15 Oct 21, 2002.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 1 Defect testing l Testing programs to establish the presence of system defects.
1 Integration Testing CS 4311 I. Burnstein. Practical Software Testing, Springer-Verlag, 2003.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Chapter 7 Implementation. Implementation Approaches F Big bang –Code entire system and test in an unstructured manner F Top-down –Start by implementing.
Software Engineering Saeed Akhtar The University of Lahore.
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.
Integration testing Integrate two or more module.i.e. communicate between the modules. Follow a white box testing (Testing the code)
1 Software Testing Strategies: Approaches, Issues, Testing Tools.
Integration Testing Beyond unit testing. 2 Testing in the V-Model Requirements Detailed Design Module implementation Unit test Integration test System.
What is a level of test?  Defined by a given Environment  Environment is a collection of people, hard ware, software, interfaces, data etc.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 9, Testing.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
Software testing techniques Software testing techniques Sandwich strategy Presentation on the seminar Kaunas University of Technology.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 9, Testing.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
What is this?. Erroneous State (“Error”) Algorithmic Fault.
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.
CSC 395 – Software Engineering Lecture 27: White-Box Testing.
Defect testing Testing programs to establish the presence of system defects.
Chapter 11, Testing, Part 2: Integration and System Testing
Group mambers: Maira Naseer (BCS ).
Chapter-5 (Testing Strategy)
Integration Testing.
Marius Skudžinskas IFM-02
Chapter 11, Testing, Part 2: Integration and System Testing
Lecture 09:Software Testing
Software System Integration
Higher-Level Testing and Integration Testing
Chapter 10 – Software Testing
Integration Testing CS 4311
Chapter 11: Integration- and System Testing
Chapter 11: Integration and System Testing
CS410 – Software Engineering Lecture #11: Testing II
Presentation transcript:

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.1 (OO) Integration Testing What: Integration testing is a phase of software testing in which individual software modules are combined and tested as a group. It follows unit testing and precedes system testing. Informally - a (design) point of view Why: The purpose of integration testing is to verify functional, performance and reliability requirements placed on major design artefacts. How: integration testing is a logical extension of unit testing. In its simplest form, two units that have already been tested are combined into a component and the interface between them is tested. But choosing the integration order is non-trivial!

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.2 (OO) Integration vs RegressionTesting – another (incremental development) point of view Integration tests are performed when new code is added to an existing code base; for example, when a new function is added to a set of existing functions. Integration tests measure whether the new code works -- integrates -- with the existing code; these tests look for data input and output, correct handling of variables, etc. Regression testing is the counterpart of integration testing: when new code is added to existing code, regression testing verifies that the existing code continues to work correctly, whereas integration testing verifies that the new code works as expected. Regression testing can describes the process of testing new code to verify that this new code hasn't broken any old code. Question: is this incremental view a good way of thinking about integration testing or is the design view better?

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.3 Integration Testing: What about OO? The components to be tested are object classes that are instantiated as objects Larger grain than individual functions so approaches to white-box testing have to be extended No obvious ‘top’ to the system for top-down integration and testing Levels of integration are less distinct in object-oriented systems Cluster testing is concerned with integrating and testing clusters of cooperating objects Identify clusters using knowledge of the operation of objects and the system features that are implemented by these clusters

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.4 Integration Testing: What Clusters? Use-case or scenario testing Testing is based on a user interactions with the system Has the advantage that it tests system features as experienced by users Thread testing Tests the systems response to events as processing threads through the system Object interaction testing Tests sequences of object interactions that stop when an object operation does not call on services from another object

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.5 (OO) Integration Testing Tests complete systems or subsystems composed of integrated components Integration testing should be black-box testing with tests derived from the specification Main difficulty is localising errors Incremental integration testing reduces this problem

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.6 Component testing Testing of individual program components Usually the responsibility of the component developer (except sometimes for critical systems) Tests are derived from the developer’s experience Integration testing Testing of groups of components integrated to create a system or sub-system The responsibility of an independent testing team Tests are based on a system specification Integration of components

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.7 Integration of components

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.8 Integration of components: test process is the same

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.9 The entire system is viewed as a collection of subsystems (sets of classes) determined during the system and object design. The order in which the subsystems are selected for testing and integration determines the testing strategy –Big bang integration (Nonincremental) –Bottom up integration –Top down integration –Sandwich testing –Variations of the above For the selection use the system decomposition from the System Design Integration Testing Strategy

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.10 A B C D G F E Layer I Layer II Layer III Example Design Structure: Three Layer Call Hierarchy

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.11 Unit Test F Unit Test E Unit Test D Unit Test C Unit Test B Unit Test A System Test Not recommended in all but the simplest systems! Integration Testing: Big-Bang Approach

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.12 The subsystem in the lowest layer of the call hierarchy are tested individually Then the next subsystems are tested that call the previously tested subsystems This is done repeatedly until all subsystems are included in the testing Special program needed to do the testing, Test Driver: – A routine that calls a subsystem and passes a test case to it Bottom-up Testing Strategy

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.13 A B C D G F E Layer I Layer II Layer III Unit Test F Unit Test E Unit Test G Unit Test C Test D,G Test B, E, F Test A, B, C, D, E, F, G Bottom-up Integration Require Driver: B Requires Driver: A Requires Driver: G

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.14 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 requirements Advantages and Disadvantages of bottom-up integration testing

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.15 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 Testing Strategy

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.16 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 Layers Top-down Integration Testing Requires stubs: B C DE F G

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.17 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 needed Advantages and Disadvantages of top-down integration testing

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.18 Combines top-down strategy with bottom-up strategy The system is view as having three layers –A target layer ‘somewhere 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 drivers Sandwich Testing Strategy

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.19 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, D Sandwich Testing Strategy

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.20 Top and Bottom Layer Tests can be done in parallel Does not test the individual subsystems thoroughly before integration Solution: modified sandwich testing strategy: –Test in parallel: Middle layer with drivers and stubs Top layer with stubs Bottom layer with drivers –Test in parallel: Top layer accessing middle layer (top layer replaces drivers) Bottom accessed by middle layer (bottom layer replaces stubs) Advantages and Disadvantages of Sandwich Testing

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.21 A B C D G F E Layer I Layer II Layer III Test F Test E Test B Test G Test DTest A Test C Test B, E, F Triple Test I Triple Test I Triple Test I Triple Test I Test D,G Double Test II Double Test II Double Test II Double Test II Double Test I Double Test I Double Test I Double Test I Test A,C Test A, B, C, D, E, F, G Modified Sandwich Testing Strategy

INT-Evry (Masters IT– Soft Eng)IntegrationTesting 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 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. 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. Steps in Integration-Testing

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.23 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 –... 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 difficult –...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 difficult Choosing an Integration Strategy?

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.24 Establish the test objectives Design the test cases Write the test cases Test the test cases Execute the tests Evaluate the test results Change the system Do regression testing Remember the Testing Life Cycle

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.25 Test Analyst Team User Programmer too familiar with code Professional Tester Configuration Management Specialist System Designer How to Construct a Good Test Team?

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.26 In a complex system, you will probably need a test bench to co- ordinate testing activities

INT-Evry (Masters IT– Soft Eng)IntegrationTesting.27 (OO) Integration Testing Lets learn about integration testing by looking at a practical example: Check out the Source Code at the web site We will use the IntPairArray from the regression testing exercise: IntPair.java, Compare.java, IntPairArray.java, in our new system: Integration.java It is your task to compare and contrast 2 different integration testing approaches (e.g. big bang vs bottom-up) for this System.