Chapter 11: Integration- and System Testing



Similar documents
Chapter 11: Integrationand System Testing

Chapter 11, Testing, Part 2: Integration and System Testing

Software Engineering I: Software Technology WS 2008/09. Integration Testing and System Testing

Software testing. Objectives

Software development life cycle. Software Engineering - II ITNP92 - Object Oriented Software Design. Requirements. Requirements. Dr Andrea Bracciali

Module 10. Coding and Testing. Version 2 CSE IIT, Kharagpur

Software Testing Interview Questions

APPROACHES TO SOFTWARE TESTING PROGRAM VERIFICATION AND VALIDATION

Test Specification. Introduction

Chapter 7, System Design Architecture Organization. Construction. Software

Software Engineering. How does software fail? Terminology CS / COE 1530

Karunya University Dept. of Information Technology

CS 451 Software Engineering Winter 2009


Basic Testing Concepts and Terminology

In this Lecture you will Learn: Implementation. Software Implementation Tools. Software Implementation Tools

Testing and Inspecting to Ensure High Quality

Information Systems Analysis and Design CSC340. XXIV. Other Phases

Software Project Management Part 2: Work Breakdown Structures

11.1 What is Project Management? Object-Oriented Software Engineering Practical Software Development using UML and Java. What is Project Management?

Software Engineering. Software Testing. Based on Software Engineering, 7 th Edition by Ian Sommerville

How To Develop Software

Levels of Software Testing. Functional Testing

Software Engineering Question Bank

1 INTRODUCTION TO SYSTEM ANALYSIS AND DESIGN

SOFTWARE PERFORMANCE TESTING SERVICE

Tools for Integration Testing

WHAT WE NEED TO START THE PERFORMANCE TESTING?

Requirements Traceability. Mirka Palo

Software Development Process Models and their Impacts on Requirements Engineering Organizational Requirements Engineering

Basic Unix/Linux 1. Software Testing Interview Prep

An Analysis on Objectives, Importance and Types of Software Testing

Software Testing Lifecycle

(BA122) Software Engineer s Workshop (SEW)

Page 1. Outline of the Lecture. What is Software Configuration Management? Why Software Configuration Management?

A Security Approach in System Development Life Cycle

A Comparison of SOA Methodologies Analysis & Design Phases

A Case Study of the Systems Engineering Process in Healthcare Informatics Quality Improvement. Systems Engineering. Ali M. Hodroj

Methods of software quality assurance. Daniel Osielczak Sebastian Mianowski

Presentation: 1.1 Introduction to Software Testing

IV. Software Lifecycles

Use service virtualization to remove testing bottlenecks

Metrics in Software Test Planning and Test Design Processes

Chapter 4, Requirements Elicitation

Getting started with API testing

Organizational Requirements Engineering

Component-based Development Process and Component Lifecycle Ivica Crnkovic 1, Stig Larsson 2, Michel Chaudron 3

Software Testing. Knowledge Base. Rajat Kumar Bal. Introduction

Extend the value of your core business systems.

Requirements Management

JOURNAL OF OBJECT TECHNOLOGY

Software Engineering. What is a system?

Patterns in Software Engineering

Software Testing Strategies and Techniques

TESTING FRAMEWORKS. Gayatri Ghanakota

Applied Software Project Management

ABSTRACT. would end the use of the hefty 1.5-kg ticket racks carried by KSRTC conductors. It would also end the

SOFTWARE ENGINEERING INTERVIEW QUESTIONS

Object-Oriented Systems Analysis and Design

Chapter 8 Requirements Management Organizational Requirements Engineering

Design Document Version 0.0

How to Activate People to Adopt Data Governance

And the Models Are System/Software Development Life Cycle. Why Life Cycle Approach for Software?

CS 389 Software Engineering. Lecture 2 Chapter 2 Software Processes. Adapted from: Chap 1. Sommerville 9 th ed. Chap 1. Pressman 6 th ed.

Chapter 8 Software Testing

Process Models and Metrics

Chapter 10. Practical Database Design Methodology. The Role of Information Systems in Organizations. Practical Database Design Methodology

Sample Exam Foundation Level Syllabus. Mobile Tester

LECTURE 1. SYSTEMS DEVELOPMENT

Lecture 17: Requirements Specifications

Chapter 8 Approaches to System Development

Chapter 13 Configuration Management

SOFTWARE PERFORMANCE EVALUATION ALGORITHM EXPERIMENT FOR IN-HOUSE SOFTWARE USING INTER-FAILURE DATA

The Dangers of Use Cases Employed as Test Cases

Copyright 1

Expert Reference Series of White Papers. Intersecting Project Management and Business Analysis

Software Engineering/Courses Description Introduction to Software Engineering Credit Hours: 3 Prerequisite: (Computer Programming 2).

Software Testing. System, Acceptance and Regression Testing

Software Testing Tutorial

Performance Testing. Slow data transfer rate may be inherent in hardware but can also result from software-related problems, such as:

A system is a set of integrated components interacting with each other to serve a common purpose.

8. Master Test Plan (MTP)

Using Multipathing Technology to Achieve a High Availability Solution

The Software Process. The Unified Process (Cont.) The Unified Process (Cont.)

Chapter 13 Configuration Management

Lecture Overview. Object-Oriented Software Engineering: Using UML, Patterns, Java, and Software Development Processes. Prof. Dr.

Application development = documentation processing

Introduction to Automated Testing

Introduction to Embedded Systems. Software Update Problem

Acknowledgement. Software Engineering. CS 3141: Team Software Project Introduction

Lecture 8. Systems engineering L E C T U R E. SIMILAR process. Zuzana Bělinová. Faculty of Transportation Sciences, CTU in Prague

Software Development Processes. Software Life-Cycle Models

CS4507 Advanced Software Engineering

Test Data Management Best Practice

Software Process and Models

Transcription:

Chapter 11: Integration- and System Testing Chapter 14: Testing (2/2) Object-Oriented Software Construction Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit)

Software Lifecycle Activities...and their models Requirements Elicitation Analysis System Design Object Design Implementation Testing Expressed in Terms of Structured by Realized by Implemented by Verified by class... class... class...? Use Case Model Application Domain Objects Subsystems Solution Domain Objects Source Code class...? Test Cases Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 2

Test Team Analyst Professional Tester Programmer too familiar with code User Test Team System Designer Configuration Management Specialist Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 3

Types of Testing Unit Testing (last lecture): Individual subsystem Carried out by developers (of components) Goal: Confirm that subsystems is correctly coded and carries out the intended functionality Integration Testing (mainly this lecture): Groups of subsystems (collection of classes) and eventually the entire system Carried out by developers Goal: Test the interface and the interplay among the subsystem Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 4

Types of Testing System Testing: The entire system Carried out by developers (testers!) Goal: Determine if the system meets the requirements (functional and global) Functional Testing: Test of functional requirements Performance Testing: Test of non-functional requirements Acceptance and Installation Testing: Evaluates the system delivered by developers Carried out by the client. Goal: Demonstrate that the system meets customer requirements and is ready to use Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 5

Integration Testing Strategy The entire system is viewed as a collection of subsystems (sets of classes) determined during the system and object design. Assumption: System Decomposition is hierarchical 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 Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 6

Example: Three Layer Call Hierarchy User Interface Layer III Billing System Event Service Learning Layer II Database Network Access Neural Network Layer I Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 7

Integration Testing: Big-Bang Approach Unit Test A Unit Test B Unit Test C Unit Test D Don t try this! System Test All components (units) are first tested individually and then together as a single and entire system: Pros: No test stubs (mocks) and drivers are needed Cons: Difficult to pinpoint the specific component responsible for the failure Results in Strategies that integrate only a few components at the time Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 8

Bottom-up Testing Strategy The subsystem in the lowest layer of the call hierarchy are tested individually Then the next subsystems are integrated and tested from the next layer up that call the previously tested subsystems This is done repeatedly until all subsystems are included in the testing Only Test Drivers are used to simulate the components of higher layers No Test Stubs! Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 9

Bottom-up Integration A Layer III Test E B C D Layer I Test B, E, F E F G Layer I Test F Test C Test A, B, C, D, E, F, G Test G Test D,G Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 10

Pros and Cons of bottom up integration testing Pros: Interface faults can be more easily found (the usage of test drivers accomplishes a clear intention of the underlying interfaces of the lower layer) No Stubs are necessary Cons: Components of the User Interface are tested last Faults found in the top layer may lead to changes in the subsystems of lower layers, invalidating previous tests. Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 11

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 Test Stubs are used to simulate the components of lower layers that have not yet been integrated. No drivers are needed Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 12

Top-down Integration Testing A Layer III B C D Layer I E F G Layer I Test A Layer III Test A, B, C, D Layer III + II Test A, B, C, D, E, F, G All Layers Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 13

Pros and Cons of top-down integration testing Pros: Test cases can be defined in terms of the functionality of the system (functional requirements) More effective for finding faults that are visible to the user Cons: 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. Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 14

Sandwich Testing Strategy Combines top-down strategy with bottom-up strategy (parallel testing is possible) The system is view as having three layers A target layer in the middle A layer above the target (top layer) A layer below the target (bottom layer) Testing converges towards the target layer No Test Stubs and Drivers are necessary for bottom and top layer Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 15

Sandwich Testing Strategy A Layer III B C D Layer I Test E E F G Layer I Bottom Layer Tests Test F Test G Test B, E, F Test D,G Test A, B, C, D, E, F, G Top Layer Tests Test A Test A,B,C, D Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 16

Pros and Cons of Sandwich Testing Pros: Top and Bottom Layer Tests can be done in parallel No Stubs and Drivers (saves development time) Cons: Does not test the individual subsystems on the target layer thoroughly before integration (C in the example) Solution: Modified sandwich testing strategy Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 17

Modified Sandwich Testing Strategy Tests the three layers individually before combining them in incremental tests with one another The individual layer tests consists of three tests: Target layer test with drivers and stubs Top layer test with stubs Bottom layer test with drivers The combined Layer Tests consist of two tests: Top layer accessing target layer (top layer replaces drivers) Bottom accessed by target layer (bottom layer replaces stubs) Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 18

Modified Sandwich Testing Strategy Test A Test A,B A B C D Layer III Layer II Test A,C E F G Layer I Test B Test C Test D Test A,D Test A, B, C, D Test E Test F Test G Test D,G Test B, E, F Test A, B, C, D, E, F, G Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 19

Using the Bridge Pattern to enable early Integration Testing Use the bridge pattern to provide multiple implementations under the same interface. Interface to a component that is incomplete, not yet known or unavailable during testing VIP Seat Interface (in Vehicle Subsystem) Seat Implementation Stub Code Simulated Seat (SA/RT) Real Seat Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 20

Which Integration Strategy should you use? Factors to to consider Location of of critical parts in in the the system Availability of of hardware Availability of of components Scheduling concerns Bottom up up approach good for for object oriented design methodologies Test Test driver interfaces must match component interfaces.........top-level components are are usually important and and cannot be be neglected up up to to the the end end of of testing Detection of of design errors postponed until until end end of of testing Top Top down approach Test Test cases can can be be defined in in terms of of functions examined Need to to maintain correctness of of test test stubs Writing stubs can can be be difficult Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 21

System Testing Functional Testing Performance Testing Acceptance Testing Installation Testing Impact of requirements on system testing: The more explicit the requirements, the easier they are to test. Quality of use cases determines the ease of functional testing Quality of nonfunctional requirements and constraints determines the ease of performance tests: Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 22

Functional Testing Functional. testing finds differences between functional requirements and the implemented system Essentially the same as black box testing Goal: Test functionality of system Test cases are designed from the requirements analysis document (better: user manual) and centered around requirements and key functions (use cases). Select tests that are relevant to the user and have a high probability of uncovering a failure Use techniques like equivalence tests Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 23

Performance Testing Stress Testing Checks if the system can respond to many simultaneous requests (maximum # of users, peak demands) Volume testing Test what happens if large amounts of data are handled Configuration testing Test the various software and hardware configurations Compatibility test Test backward compatibility with existing systems Security testing Try to violate security requirements Timing testing Evaluate response times and time to perform a function Environmental test Test tolerances for heat, humidity, motion, portability Quality testing Test reliability, maintainability & availability of the system Recovery testing Tests system s response to presence of errors or loss of data. Human factors testing Tests user interface with user Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 24

Test Cases for Performance Testing Push the (integrated) system to its limits. Goal: Try to break the subsystem Test how the system behaves when overloaded. Can bottlenecks be identified? (First candidates for redesign in the next iteration Try unusual orders of execution Call a receive() before send() Check the system s response to large volumes of data If the system is supposed to handle 1000 items, try it with 1001 items. What is the amount of time spent in different use cases? Are typical cases executed in a timely fashion? Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 25

Steps in Testing (only developer s view) 1. 1. Based on on the the integration strategy, select select a a componen to to be be tested. Unit Unit test test all all the the classes in in the the component. 2.. 2. Put Put selected component together; do do any anypreliminary fix-up fix-up necessary to to make the the integration test test operational (drivers, stubs) 3. 3. Do Dofunctional testing: Define test test cases that that exercise all all uses uses cases with with the the selected component 4. 4. Execute performance tests tests 5. 5. Keep Keep records of of the the test test cases and and testing activities. 6. 6. Repeat steps 1 to to 5 until until the the full full system is is tested. The The primary goal goal of of integration testing is is to to identify errors errors in in the the (current) component configuration. Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 26

Acceptance Testing Goal: Demonstrate system is is ready for for operational use Choice of of tests tests is is made by by client Many tests tests can can be be taken from from integration testing Acceptance test test is is performed by by the the client, not not by by the the developer. Majority of of all all bugs in in software is is typically found by by the the client after after the the system is is in in use, use, not not by by the the developers or or testers. Therefore two two kinds of of additional tests: Alpha test: Sponsor uses uses the the software at at the the developer s site. site. Software used used in in a controlled setting, with with the the developer always ready to to fix fix bugs. Beta test: Conducted at at sponsor s site site (developer is is not not present) Software gets gets a realistic workout in in target environment Potential customer might get get discouraged Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 27

Summary Testing is is still a black art, but many rules and heuristics are available Testing consists of ofcomponent-testing (unit testing, integration testing) and system testing Design Patterns can be be used for for integration testing Testing has its its own lifecycle Armin B. Cremers, Sascha Alda & Tobias Rho (based on Bruegge & Dutoit) Object-Oriented Software Construction 28