ISBN 0-13-146913-4 Prentice-Hall, 2006 Chapter 8 Testing the Programs Copyright 2006 Pearson/Prentice Hall. All rights reserved.

Slides:



Advertisements
Similar presentations
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 11: Integration- and System Testing.
Advertisements

ISBN Prentice-Hall, 2006 Chapter 2 Modeling the Process and Life Cycle Copyright 2006 Pearson/Prentice Hall. All rights reserved.
Software Failure: Reasons Incorrect, missing, impossible requirements * Requirement validation. Incorrect specification * Specification verification. Faulty.
ISBN Prentice-Hall, 2006 Chapter 8 Testing the Programs Copyright 2006 Pearson/Prentice Hall. All rights reserved.
Testing Without Executing the Code Pavlina Koleva Junior QA Engineer WinCore Telerik QA Academy Telerik QA Academy.
Chapter 8 Testing the Programs Shari L. Pfleeger Joann M. Atlee 4th Edition.
Illinois Institute of Technology
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
Lecturer: Dr. AJ Bieszczad Chapter 87-1 How does software fail? Wrong requirement: not what the customer wants Missing requirement Requirement impossible.
Software Testing Introduction. Agenda Software Testing Definition Software Testing Objectives Software Testing Strategies Software Test Classifications.
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 27 Slide 1 Quality Management 1.
CH08: Testing the Programs
Chapter 22 Systems Design, Implementation, and Operation Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 22-1.
… and after unit testing …
ECE 355: Software Engineering
ISBN Prentice-Hall, 2006 Chapter 10 Delivering the System Copyright 2006 Pearson/Prentice Hall. All rights reserved.
Verification and Validation Yonsei University 2 nd Semester, 2014 Sanghyun Park.
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
Overview Integration Testing Decomposition Based Integration
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
Chapter 8 Testing the Programs Shari L. Pfleeger Joann M. Atlee
Software Testing.
Pfleeger and Atlee, Software Engineering: Theory and PracticePage 4.1 © 2006 Pearson/Prentice Hall Sidebar 4.1 Why Are Requirements Important? Top factors.
Verification and Validation Overview References: Shach, Object Oriented and Classical Software Engineering Pressman, Software Engineering: a Practitioner’s.
Software Testing ©Dr. David A. Workman School of EE and Computer Science March 19, 2007.
INT-Evry (Masters IT– Soft Eng)IntegrationTesting.1 (OO) Integration Testing What: Integration testing is a phase of software testing in which.
Chapter 10 Information Systems Analysis and Design
Testing Basics of Testing Presented by: Vijay.C.G – Glister Tech.
1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 23 Reliability III.
Pfleeger and Atlee, Software Engineering: Theory and PracticePage 3.1 © 2006 Pearson/Prentice Hall 3.1 Tracking Progress : Gantt Chart Activities shown.
Unit 7 Chapter 8 Testing the Programs. Unit 7 Requirements Read Chapters 8 and 9 Respond to the Unit 7 Discussion Board (25 points) Attend seminar/Take.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
1 Introduction to Software Testing. Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Chapter 1 2.
Testing the programs In this part we look at classification of faults the purpose of testing unit testing integration testing strategies when to stop testing.
1 Integration Testing CS 4311 I. Burnstein. Practical Software Testing, Springer-Verlag, 2003.
Chapter 1: Fundamental of Testing Systems Testing & Evaluation (MNN1063)
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Software Testing and Quality Assurance 1. What is the objectives of Software Testing?
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.
Integration testing Integrate two or more module.i.e. communicate between the modules. Follow a white box testing (Testing the code)
Testing the Programs 中国科学技术大学软件学院 孟宁 2010 年 12 月.
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.
Chapter 1 Software Engineering Principles. Problem analysis Requirements elicitation Software specification High- and low-level design Implementation.
 Software Testing Software Testing  Characteristics of Testable Software Characteristics of Testable Software  A Testing Life Cycle A Testing Life.
Winter 2007SEG2101 Chapter 121 Chapter 12 Verification and Validation.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
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.
Tool Support for Testing Classify different types of test tools according to their purpose Explain the benefits of using test tools.
Chapter 8 Testing the Programs 8.1 Software Faults and Failures 1. Introduction  faults: A: definition: the problem caused by error B: cause: X: the software.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
Software Testing. Software Quality Assurance Overarching term Time consuming (40% to 90% of dev effort) Includes –Verification: Building the product right,
Software Testing Strategies for building test group
Software Engineering TESTING Compiled by: Dr. S. Prem Kumar
Integration Testing.
Rekayasa Perangkat Lunak Part-13
Verification and Testing
Lecture 09:Software Testing
Chapter 8 Testing the Programs Shari L. Pfleeger Joann M. Atlee 4th Edition.
Verification and Validation Unit Testing
Static Testing Static testing refers to testing that takes place without Execution - examining and reviewing it. Dynamic Testing Dynamic testing is what.
Testing the Programs 东华理工大学软件学院 李祥.
Chapter 10 – Software Testing
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Exam 1 review CS 360 Lecture 20.
© Oxford University Press All rights reserved.
Presentation transcript:

ISBN Prentice-Hall, 2006 Chapter 8 Testing the Programs Copyright 2006 Pearson/Prentice Hall. All rights reserved.

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.2 © 2006 Pearson/Prentice Hall Contents 8.3Unit Testing 8.4Integration Testing 8.5Testing Object-Oriented Systems 8.6Test Planning 8.7Automated Testing Tools 8.8When to Stop Testing 8.9 Information System Example 8.10Real Time Example 8.11What this Chapter Means for You

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.3 © 2006 Pearson/Prentice Hall 8.3 Unit Testing Code Review Code walkthrough Code inspection

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.4 © 2006 Pearson/Prentice Hall 8.3 Unit Testing Typical Inspection Preparation and Meeting Times Development ArtifactPreparation TimeMeeting Time Requirement Document25 pages per hour12 pages per hour Functional specification45 pages per hour15 pager per hour Logic specification50 pages per hour20 pages per hour Source code150 lines of code per hour 75 lines of code per hour User documents35 pages per hour20 pages per hour

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.5 © 2006 Pearson/Prentice Hall 8.3 Unit Testing Fault Discovery Rate Discovery Activity Faults Found per Thousand Lines of Code Requirements review2.5 Design Review5.0 Code inspection10.0 Integration test3.0 Acceptance test2.0

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.6 © 2006 Pearson/Prentice Hall 8.3 Unit Testing Sidebar 8.3 The Best Team Size for Inspections The preparation rate, not the team size, determines inspection effectiveness The team’s effectiveness and efficiency depend on their familiarity with their product

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.7 © 2006 Pearson/Prentice Hall 8.3 Unit Testing Proving Code Correct Formal proof techniques Symbolic execution Automated theorem-proving

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.8 © 2006 Pearson/Prentice Hall 8.3 Unit Testing Proving Code Correct: An Illustration

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.9 © 2006 Pearson/Prentice Hall 8.3 Unit Testing Testing versus Proving Proving: hypothetical environment Testing: actual operating environment

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.10 © 2006 Pearson/Prentice Hall 8.3 Unit Testing Steps in Choosing Test Cases Determining test objectives Selecting test cases Defining a test

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.11 © 2006 Pearson/Prentice Hall Chapter 8 Objectives Types of faults and how to classify them The purpose of testing Unit testing Integration testing strategies Test planning When to stop testing

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.12 © 2006 Pearson/Prentice Hall 8.4 Integration Testing Bottom-up Top-down Big-bang Sandwich testing Modified top-down Modified sandwich

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.13 © 2006 Pearson/Prentice Hall 8.4 Integration Testing Terminology Component Driver: a routine that calls a particular component and passes a test case to it Stub: a special-purpose program to simulate the activity of the missing component

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.14 © 2006 Pearson/Prentice Hall 8.4 Integration Testing View of a System System viewed as a hierarchy of components

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.15 © 2006 Pearson/Prentice Hall 8.4 Integration Testing Bottom-Up Integration Example The sequence of tests and their dependencies

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.16 © 2006 Pearson/Prentice Hall 8.4 Integration Testing Top-Down Integration Example Only A is tested by itself

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.17 © 2006 Pearson/Prentice Hall 8.4 Integration Testing Modified Top-Down Integration Example Each level’s components individually tested before the merger takes place

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.18 © 2006 Pearson/Prentice Hall 8.4 Integration Testing Big-Bang Integration Example Requires both stubs and drivers to test the independent components

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.19 © 2006 Pearson/Prentice Hall 8.4 Integration Testing Sandwich Integration Example Viewed system as three layers

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.20 © 2006 Pearson/Prentice Hall 8.4 Integration Testing Modified Sandwich Integration Example Allows upper-level components to be tested before merging them with others

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.21 © 2006 Pearson/Prentice Hall 8.4 Integration Testing Comparison of Integration Strategies Bottom- up Top- down Modified top-down Big-bangSandwichModified sandwich IntegrationEarly LateEarly Time to basic working program LateEarly LateEarly Component drivers needed YesNoYes Stubs neededNoYes Work parallelism at beginning MediumLowMediumHighMediumHigh Ability to test particular paths EasyHardEasy MediumEasy Ability to plan and control sequence EasyHard EasyHardhard

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.22 © 2006 Pearson/Prentice Hall 8.4 Integration Testing Sidebar 8.5 Builds at Microsoft The feature teams synchronize their work by building the product and finding and fixing faults on a daily basis

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.23 © 2006 Pearson/Prentice Hall 8.5 Testing Object-Oriented Systems Questions at the Beginning of Testing OO System Is there a path that generates a unique result? Is there a way to select a unique result? Are there useful cases that are not handled?

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.24 © 2006 Pearson/Prentice Hall 8.5 Testing Object-Oriented Systems Easier and Harder Parts of Testing OO Systems OO unit testing is less difficult, but integration testing is more extensive

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.25 © 2006 Pearson/Prentice Hall 8.5 Testing Object-Oriented Systems Differences Between OO and Traditional Testing The farther the gray line is out, the more the difference

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.26 © 2006 Pearson/Prentice Hall 8.6 Test Planning Establish test objectives Design test cases Write test cases Test test cases Execute tests Evaluate test results

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.27 © 2006 Pearson/Prentice Hall 8.6 Test Planning Purpose of the Plan Test plan explains –who does the testing –why the tests are performed –how tests are conducted –when the tests are scheduled

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.28 © 2006 Pearson/Prentice Hall 8.6 Test Planning Contents of the Plan What the test objectives are How the test will be run What criteria will be used to determine when the testing is complete

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.29 © 2006 Pearson/Prentice Hall 8.7 Automated Testing Tools Code analysis –Static analysis code analyzer structure checker data analyzer sequence checker Output from static analysis

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.30 © 2006 Pearson/Prentice Hall 8.7 Automated Testing Tools (continued) Dynamic analysis –program monitors: watch and report program’s behavior Test execution –Capture and replay –Stubs and drivers –Automated testing environments Test case generators

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.31 © 2006 Pearson/Prentice Hall 8.8 When to Stop Testing More faulty? Probability of finding faults during the development

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.32 © 2006 Pearson/Prentice Hall 8.8 When to Stop Testing Stopping Approaches Coverage criteria Fault seeding detected seeded faults = detected nonseeded faults total seeded faults total nonseeded faults Confidence in the software, C = 1, if n >N = S/(S – N + 1) if n ≤ N

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.33 © 2006 Pearson/Prentice Hall 8.8 When to Stop Testing Identifying Fault-Prone Code Track the number of faults found in each component during the development Collect measurements (e.g., size, number of decisions) about each component Classification trees: a statistical technique that sorts through large arrays of measurement information and creates a decision tree to show best predictors –A tree helps in deciding the which components are likely to have a large number of errors

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.34 © 2006 Pearson/Prentice Hall 8.8 When to Stop Testing An Example of a Classification Tree

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.35 © 2006 Pearson/Prentice Hall 8.9 Information System Example Piccadilly System Using data-flow testing strategy rather than structural –Definition-use testing

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.36 © 2006 Pearson/Prentice Hall 8.10 Real-Time Example The Ariane-5 System The Ariane-5’s flight control system was tested in four ways –equipment testing –on-board computer software testing –staged integration –system validation tests The Ariane-5 developers relied on insufficient reviews and test coverage

Pfleeger and Atlee, Software Engineering: Theory and PracticePage 8.37 © 2006 Pearson/Prentice Hall 8.11 What this Chapter Means for You It is important to understand the difference between faults and failures The goal of testing is to find faults, not to prove correctness