Chapter 13 & 14 Software Testing Strategies and Techniques 1 Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.

Slides:



Advertisements
Similar presentations
SOFTWARE ENGINEERING & IT 0301 Semester V
Advertisements

Testing (1) Let’s look at : Principles of testing The testing process
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
Creator: ACSession No: 13 Slide No: 1Reviewer: SS CSE300Advanced Software EngineeringFebruary 2006 Testing - Techniques CSE300 Advanced Software Engineering.
Chapter 17 Software Testing Techniques
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Software Engineering Lecture 12 Software Testing Techniques 1.
Software Testing Strategies based on Chapter 13 - Software Engineering: A Practitioner’s Approach, 6/e copyright © 1996, 2001, 2005 R.S. Pressman & Associates,
Software Testing & Strategies
Software Engineering Lecture 13 Software Testing Strategies 1.
Chapter 13 & 14 Software Testing Strategies and Techniques
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 13b: Software Testing Strategies Software Engineering: A Practitioner’s Approach, 6/e Chapter.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
CMSC 345 Fall 2000 Unit Testing. The testing process.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 13a: Software Testing Strategies Software Engineering: A Practitioner’s Approach, 6/e Chapter.
1 Software Engineering Muhammad Fahad Khan Software Engineering Muhammad Fahad Khan University Of Engineering.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
1 Chapter 7 Software Testing Strategies. 2 Software Testing Testing is the process of exercising a program with the specific intent of finding errors.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Agenda Introduction Overview of White-box testing Basis path testing
1 Chapter 6 Software Testing Techniques. 2 Testability Operability—it operates cleanly Operability—it operates cleanly Observability—the results of each.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 14a: Software Testing Techniques Software Engineering: A Practitioner’s Approach, 6/e Chapter.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 6/e (McGraw-Hill 2005). Slides copyright 2005 by Roger Pressman.1.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
Dynamic Testing.
Software Engineering By Germaine Cheung Hong Kong Computer Institute Lecture 7.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 Lecture 14: Chapter 18 Testing Conventional Applications Slide Set to accompany Software Engineering: A Practitioner’s Approach, 7/e by Roger S. Pressman.
CSC 395 – Software Engineering Lecture 27: White-Box Testing.
Software Testing Testing is the process of exercising a program with the specific intent of finding errors prior to delivery to the end user.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Software Testing. SE, Testing, Hans van Vliet, © Nasty question  Suppose you are being asked to lead the team to test the software that controls.
Chapter 17 Software Testing Techniques
Software Testing Strategies for building test group
Chapter 18 Testing Conventional Applications
Software Testing.
Software Testing Techniques
Chapter 18 Testing Conventional Applications
Software Engineering: A Practitioner’s Approach, 6/e Chapter 13 Software Testing Strategies copyright © 1996, 2001, 2005 R.S. Pressman & Associates,
Chapter 13 & 14 Software Testing Strategies and Techniques
Chapter 18 Testing Conventional Applications
Chapter 18 Testing Conventional Applications
Static Testing Static testing refers to testing that takes place without Execution - examining and reviewing it. Dynamic Testing Dynamic testing is what.
Chapter 17 Software Testing Strategies
Chapter 18 Testing Conventional Applications
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.
Chapter 18 Testing Conventional Applications.
Chapter 17 Software Testing Strategies
Chapter 23 Testing Conventional Applications
Chapter 17 Software Testing Strategies
Chapter 17 Software Testing Strategies.
Chapter 22 Software Testing Strategies
Software Testing “If you can’t test it, you can’t design it”
Chapter 17 Software Testing Strategies
Software Testing Techniques
Chapter 17 Software Testing Strategies
Software Testing Strategies
Presentation transcript:

Chapter 13 & 14 Software Testing Strategies and Techniques 1 Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman

Software Testing 2 Testing is the process of exercising a program with the specific intent of finding errors prior to delivery to the end user.

What Testing Shows 3 errors requirements conformance performance an indication of quality

Who Tests the Software? 4 developer independent tester Understands the system but, will test "gently" and, is driven by "delivery" Must learn about the system, but, will attempt to break it and, is driven by quality

Validation vs Verification Verification – Are we building the product right? – Is the code correct with respect to its specification? Validation – Are we building the right product? – Does the specification reflect what it should? 5

Testing Strategy 6 unit test integrationtest validationtest systemtest

Testing Strategy Begin with unit testing and work your way up to system testing. 1) Unit testing – test individual components (modules in procedural languages; classes in OO languages). 2) Integration testing – test collections of components that must work together. 3) Validation testing – test the application as a whole against user requirements. 4) System testing – test the application in the context of an entire system. 7

1) Unit Testing 8 module to be tested test cases results softwareengineer

Unit Testing 9 interface local data structures boundary conditions independent paths error handling paths module to be tested test cases

Unit Test Environment 10 Module stub stub driver RESULTS interface local data structures boundary conditions independent paths error handling paths test cases

2) Integration Testing Strategies 11 Options: the “big bang” approach an incremental construction strategy

Top Down Integration 12 top module is tested with stubs stubs are replaced one at a time, "depth first" as new modules are integrated, some subset of tests is re-run A B C DE FG

Bottom-Up Integration 13 drivers are replaced one at a time, "depth first" worker modules are grouped into builds and integrated A B C DE FG cluster

Regression Testing The selective retesting of a modified system to help ensure that no bugs have been introduced during modification. – Fixing one part of the code can break another 14

High Order Testing 1) Validation testing – Focus is on software requirements. 2) System testing – Focus is on system integration. 3) Alpha/Beta testing – Focus is on customer usage. 15

16 4) Recovery testing forces the software to fail in a variety of ways and verifies that recovery is properly performed. 5) Security testing verifies that protection mechanisms built into a system will, in fact, protect it from improper penetration. 6) Stress testing executes a system in a manner that demands resources in abnormal quantity, frequency, or volume. 7) Performance Testing test the run-time performance of software within the context of an integrated system.

What is a “ Good ” Test? A good test is one that has a high probability of finding an error. 17

Test Case Design 18 "Bugs lurk in corners and congregate at boundaries..." Boris Beizer OBJECTIVE CRITERIA CONSTRAINT to uncover errors in a complete manner with a minimum of effort and time

Exhaustive Testing 19 loop < 20 X There are 10 possible paths! If we execute one test per millisecond, it would take 3,170 years to test this program!! 14

Selective Testing 20 loop < 20 X Selected path

Software Testing 21 Methods Strategies white-box methods black-box methods

White-Box Testing our goal is to ensure that all statements and conditions have been executed at least once...

Why Cover? 23 logic errors and incorrect assumptions are inversely proportional to a path's execution probability we oftenbelieve that a path is not likely to be executed; in fact, reality is often counter intuitive typographical errors are random; it's likely that untested paths will contain some

Basis Path Testing 24 First, we compute the cyclomatic complexity: number of simple decisions + 1 or number of enclosed areas + 1 In this case, V(G) = 4

Cyclomatic Complexity 25 A number of industry studies have indicated that the higher V(G), the higher the probability or errors. V(G) modules modules in this range are more error prone

Basis Path Testing 26 Next, we derive the independent paths: Since V(G) = 4, there are four paths Path 1: 1,2,3,6,7,8 Path 2: 1,2,3,5,7,8 Path 3: 1,2,4,7a,8 Path 4: 1,2,4,7,2,4,...7,8 Finally, we derive test cases to exercise these paths

Basis Path Testing Notes 27 you don't need a flow chart, but the picture will help when you trace program paths count each simple logical test, compound tests count as 2 or more basis path testing should be applied to critical modules

Black-Box Testing 28 requirements events input output

Equivalence Partitioning 29 userqueries mousepicks outputformats prompts FKinput data

Sample Equivalence Classes 30 user supplied commands responses to system prompts file names computational data physical parameters bounding values initiation values output data formatting responses to error messages graphical data (e.g., mouse picks) data outside bounds of the program physically impossible data proper value supplied in wrong place Valid data Invalid data

Boundary Value Analysis 31 user queries mouse picks output formats prompts FK input data output domain input domain

OOT Methods: Behavior Testing 32 The tests to be designed should achieve all state coverage [KIR94]. That is, the operation sequences should cause the Account class to make transition through all allowable states