Presentation is loading. Please wait.

Presentation is loading. Please wait.

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.

Similar presentations


Presentation on theme: "These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by."— Presentation transcript:

1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 13 Software Testing Strategies Software Engineering: A Practitioner’s Approach, 6/e Chapter 13 Software Testing Strategies copyright © 1996, 2001, 2005 R.S. Pressman & Associates, Inc. For University Use Only May be reproduced ONLY for student use at the university level when used in conjunction with Software Engineering: A Practitioner's Approach. Any other reproduction or use is expressly prohibited.

2 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 2 Software Testing Testing is the process of exercising a program with the specific intent of finding errors prior to delivery to the end user.

3 Test strategy provides a road map; Test strategy provides a road map; Steps to be conducted Steps to be conducted When When How much effort, time, resources How much effort, time, resources Test strategy Test strategy Test planning Test planning Test case design Test case design Test execution Test execution Resultant data collection and evaluation Resultant data collection and evaluation These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 3

4 Verification and Validation V&V Testing is part of V&V Testing is part of V&V Verification: Are we building the product right? Verification: Are we building the product right? Software correctly implements a specific function Software correctly implements a specific function Validation: Are we building the right product? Validation: Are we building the right product? Software is traceable to customer requirements Software is traceable to customer requirements These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 4

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

6 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 6 Who Tests the Software? 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

7 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 7 Testing Strategy unit test integrationtest validationtest systemtest

8 Requirement -> high-order tests: validation test, System test Requirement -> high-order tests: validation test, System test Design -> Integration test Design -> Integration test Code -> unit test Code -> unit test These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 8

9 9 Testing Strategy We begin by ‘testing-in-the-small’ and move toward ‘testing-in-the-large’ We begin by ‘testing-in-the-small’ and move toward ‘testing-in-the-large’ For conventional software For conventional software The module (component) is our initial focus The module (component) is our initial focus Integration of modules follows Integration of modules follows For OO software For OO software our focus when “testing in the small” changes from an individual module (the conventional view) to an OO class our focus when “testing in the small” changes from an individual module (the conventional view) to an OO class that encompasses attributes and operations and implies communication and collaboration that encompasses attributes and operations and implies communication and collaboration

10 10 Strategic Issues Specify product requirements in a quantifiable manner long before testing. Specify product requirements in a quantifiable manner long before testing. State testing objectives explicitly. State testing objectives explicitly. Understand the users of the software and develop a profile for each user category. Understand the users of the software and develop a profile for each user category. Develop a testing plan that emphasizes “rapid cycle testing.” Develop a testing plan that emphasizes “rapid cycle testing.” Build “robust” software that is designed to test itself Build “robust” software that is designed to test itself Use effective formal technical reviews as a filter prior to testing Use effective formal technical reviews as a filter prior to testing Conduct formal technical reviews to assess the test strategy and test cases themselves. Conduct formal technical reviews to assess the test strategy and test cases themselves. Develop a continuous improvement approach for the testing process. Develop a continuous improvement approach for the testing process.

11 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 11 Unit Testing module to be tested test cases results softwareengineer

12 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 12 Unit Testing interface local data structures boundary conditions independent paths error handling paths module to be tested test cases

13 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 13 Unit Test Environment Module stub stub driver RESULTS interface local data structures boundary conditions independent paths error handling paths test cases

14 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 14 Integration Testing Strategies Options: the “big bang” approachthe “big bang” approach an incremental construction strategyan incremental construction strategy

15 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 15 Top Down Integration 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

16 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 16 Bottom-Up Integration drivers are replaced one at a time, "depth first" worker modules are grouped into builds and integrated A B C DE FG cluster

17 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 17 Sandwich Testing Top modules are tested with stubs Worker modules are grouped into builds and integrated A B C DE FG cluster

18 Regression testing to ensure that changes do not introduce unintended behavior or additional errors. to ensure that changes do not introduce unintended behavior or additional errors. In context of an integration test: re-execution of some subset of tests In context of an integration test: re-execution of some subset of tests Any correction -> change of software Any correction -> change of software These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 18

19 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 19 Smoke Testing A common approach for creating “daily builds” for product software A common approach for creating “daily builds” for product software Smoke testing steps: Smoke testing steps: Software components that have been translated into code are integrated into a “build.” Software components that have been translated into code are integrated into a “build.” A build includes all data files, libraries, reusable modules, and engineered components that are required to implement one or more product functions. A build includes all data files, libraries, reusable modules, and engineered components that are required to implement one or more product functions. A series of tests is designed to expose errors that will keep the build from properly performing its function. A series of tests is designed to expose errors that will keep the build from properly performing its function. The intent should be to uncover “show stopper” errors that have the highest likelihood of throwing the software project behind schedule. The intent should be to uncover “show stopper” errors that have the highest likelihood of throwing the software project behind schedule. The build is integrated with other builds and the entire product (in its current form) is smoke tested daily. The build is integrated with other builds and the entire product (in its current form) is smoke tested daily. The integration approach may be top down or bottom up. The integration approach may be top down or bottom up.

20 Identify critical modules Address several software requirements Address several software requirements Has a high level of control (high in the program structure) Has a high level of control (high in the program structure) Is complex or error prone Is complex or error prone Has definite performance requirements Has definite performance requirements These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 20

21 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 21 Object-Oriented Testing testing strategy changes testing strategy changes the concept of the ‘unit’ broadens due to encapsulation the concept of the ‘unit’ broadens due to encapsulation integration focuses on classes and their execution integration focuses on classes and their execution validation uses conventional black box methods validation uses conventional black box methods test case design draws on conventional methods, but also encompasses special features test case design draws on conventional methods, but also encompasses special features

22 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 22 OOT Strategy class testing is the equivalent of unit testing class testing is the equivalent of unit testing operations within the class are tested operations within the class are tested the state behavior of the class is examined the state behavior of the class is examined integration applied three different strategies integration applied three different strategies thread-based testing—integrates the set of classes required to respond to one input or event thread-based testing—integrates the set of classes required to respond to one input or event use-based testing—integrates the set of classes required to respond to one use case use-based testing—integrates the set of classes required to respond to one use case cluster testing—integrates the set of classes required to demonstrate one collaboration cluster testing—integrates the set of classes required to demonstrate one collaboration

23 Validation Testing Validation succeeds when software functions in a manner that can be reasonably expected by the customer. Validation succeeds when software functions in a manner that can be reasonably expected by the customer. Reasonable expectation are defined in the Software Requirement Specification Reasonable expectation are defined in the Software Requirement Specification Functional Functional Behavioral Behavioral Performance Performance Documentation Documentation Usability …. Usability …. Alpha/Beta testing Alpha/Beta testing Focus is on customer usage Focus is on customer usage 23

24 24 High Order Testing: System testing System testing System testing Focus is on system integration Focus is on system integration Recovery testing Recovery testing forces the software to fail in a variety of ways and verifies that recovery is properly performed forces the software to fail in a variety of ways and verifies that recovery is properly performed Automatic: re-initialization, check pointing, data recovery, restart Automatic: re-initialization, check pointing, data recovery, restart By human intervention ; mean-time-to-repair By human intervention ; mean-time-to-repair Security testing Security testing verifies that protection mechanisms built into a system will, in fact, protect it from improper penetration verifies that protection mechanisms built into a system will, in fact, protect it from improper penetration Stress testing Stress testing executes a system in a manner that demands resources in abnormal quantity, frequency, or volume executes a system in a manner that demands resources in abnormal quantity, frequency, or volume Performance Testing Performance Testing test the run-time performance of software within the context of an integrated system test the run-time performance of software within the context of an integrated system

25 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 25 Debugging: A Diagnostic Process

26 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 26 The Debugging Process test cases results Debugging suspectedcauses identifiedcauses corrections regressiontests new test cases

27 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 27 Debugging Effort time required to diagnose the symptom and determine the cause time required to correct the error and conduct regression tests

28 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 28 Symptoms & Causes symptom cause symptom and cause may be geographically separated symptom may disappear when another problem is fixed cause may be due to a combination of non-errors cause may be due to a system or compiler error cause may be due to assumptions that everyone believes symptom may be intermittent

29 Debugging tactics Brute force Brute force Dump the memory Dump the memory Backtracking Backtracking Start from presence of error, go backward in the code manually Start from presence of error, go backward in the code manually Cause elimination Cause elimination Cause hypothesis … Cause hypothesis … These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 29

30 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 30 Consequences of Bugs damage mild annoying disturbing serious extreme catastrophic infectious Bug Type Bug Categories: function-related bugs, function-related bugs, system-related bugs, data bugs, coding bugs, design bugs, documentation bugs, standards violations, etc.

31 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 31 Debugging: Final Thoughts think about the about the symptom you're seeing. Use tools (e.g., dynamic debugger) to gain (e.g., dynamic debugger) to gain more insight. get help from someone else. from someone else. Be absolutely sure to conduct regression tests when you do "fix" the bug. 1. 2. 3. 4.


Download ppt "These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by."

Similar presentations


Ads by Google