Download presentation
Presentation is loading. Please wait.
Published byMargaretMargaret Whitehead Modified over 9 years ago
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 Software Testing Strategies Slide Set to accompany Software Engineering: A Practitioner’s Approach, 7/e by Roger S. Pressman Slides copyright © 1996, 2001, 2005, 2009 by Roger S. Pressman For non-profit educational use only May be reproduced ONLY for student use at the university level when used in conjunction with Software Engineering: A Practitioner's Approach, 7/e. Any other reproduction or use is prohibited without the express written permission of the author. All copyright information MUST appear if these slides are posted on a website for student use.
2
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.2 Software Testing Testing is the process of exercising a program with the specific intent (willing) of finding errors prior to delivery to the end user.
3
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.3 What Testing Shows errors requirements conformance performance an indication of quality
4
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.4 Strategic Approach To perform effective testing, needs technical reviews. Starts with component level toward the integration of the entire computer-based system. testing techniques software engineering approaches points in time Different testing techniques are appropriate for different software engineering approaches and at different points in time. Testing is conducted by the developer of the software and (for large projects) an independent test group. Testing and debugging are different activities, but debugging must be accommodated in any testing strategy.
5
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.5 V & V Verification refers to set of tasks that ensure that software correctly implements a specific function. Verification: "Are we building the product right?" Validation refers to different set of tasks that ensure that the software that has been built is traceable to customer requirements. Validation: "Are we building the right product?"
6
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.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 slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.7 Testing Strategy Code Design Requirements System Engineering Unit Testing Integration Testing Validation Testing System Testing
8
Overall Testing Strategy System Engineering Requirements Design ConstructionUnit Testing Integration Testing System Testing (Software) System Testing (Final) System Engineering The software you're building may be only one part of a much larger system containing many hardware and software components System Engineering deals with engineering the entire system, not just the software components, and goes beyond the scope of Software Engineering
9
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.9 Testing Strategy We begin by ‘testing-in-the-small’ and move toward ‘testing-in-the-large’ For conventional software The module (component) is our initial focus Integration of modules follows For OO software 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
10
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.10 Strategic Issues Specify product requirements in a quantifiable manner long before testing commences. State testing objectives explicitly. Understand the users of the software and develop a profile for each user category. Develop a testing plan that emphasizes “rapid cycle testing.” Build “robust” software that is designed to test itself Use effective technical reviews as a filter prior to testing Conduct technical reviews to assess the test strategy and test cases themselves. Develop a continuous improvement approach for the testing process.
11
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.11 Unit Testing module to be tested test cases results softwareengineer
12
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.12 Unit Testing interface local data structures boundary conditions independent paths error handling paths module to be tested test cases
13
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.13 Unit Test Environment Module stub stub driver RESULTS interface local data structures boundary conditions independent paths error handling paths test cases
14
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.14 Regression Testing Regression testing is the re-execution of some subset of tests that have already been conducted to ensure that changes have not propagated unintended side effects Whenever software is corrected, some aspect of the software configuration (the program, its documentation, or the data that support it) is changed. Regression testing helps to ensure that changes (due to testing or for other reasons) do not introduce unintended behavior or additional errors. Regression testing may be conducted manually, by re- executing a subset of all test cases or using automated capture/playback tools.
15
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.15 Integration Testing Strategies Options: the “big bang” approachthe “big bang” approach Entire system is integrated at once an incremental construction strategyan incremental construction strategy during integration to ensure that the system continues to work each time a new piece is added
16
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.16 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
17
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.17 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
18
18 Performance Testing Stress test. Volume test. Configuration test (hardware & software). Compatibility. Regression tests. Security tests. Timing tests. Environmental tests. Quality tests. Recovery tests. Maintenance tests. Documentation tests. Human factors tests. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
19
19 Validation Testing Validation testing follows integration testing Focuses on user-visible actions and user-recognizable output from the system Demonstrates conformity with requirements Designed to ensure that All functional requirements are satisfied, behavioral characteristics are achieved, performance requirements are attained, Documentation is correct, Usability and other requirements are met (e.g., transportability, compatibility, error recovery, maintainability) After each validation test The function or performance characteristic conforms to specification and is accepted A configuration review or audit ensures that all elements of the software configuration have been properly developed, cataloged, and have the necessary detail for entering the support phase of the software life cycle
20
20 Recovery testing Recovery testing Tests for recovery from system faults Forces the software to fail in a variety of ways and verifies that recovery is properly performed Tests re-initialization, check-pointing mechanisms, data recovery, and restart for correctness Security testing Security testing Verifies that protection mechanisms built into a system will, in fact, protect it from improper access Stress testing Stress testing Executes a system in a manner that demands resources in abnormal quantity, frequency, or volume Performance testing Performance testing Tests the run-time performance of software within the context of an integrated system Often coupled with stress testing and usually requires both hardware and software instrumentation Can uncover situations that lead to degradation and possible system System Testing: Different Types
21
Testing Life Cycle 1. Establish test objectives. 2. Design criteria (review criteria). Correct. Feasible. Coverage. Demonstrate functionality 3. Writing test cases. 4. Testing test cases. 5. Execute test cases. 6. Evaluate test results. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.21
22
Testing Tools Simulators. Monitors. Analyzers. Test data generators These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.22
23
Testing Team Members Professional testers. Analysts. System designers. Configuration management specialists. Users. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.23
24
Test Documents needed Requirement being tested. Design verification methodology. Code verification methodology These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.24
25
Document each test case Requirement tested. Feature / path tested. Person & date. Tools & code needed. Test data & instructions. Expected results. Actual test results & analysis Correction, schedule, and signoff. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.25
26
Debugging Approaches Brute force memory dumps and run-time traces are examined for clues to error causes Backtracking source code is examined by looking backwards from symptom to potential causes of errors Cause elimination uses binary partitioning to reduce the number of locations potential where errors can exist These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.26
27
27 Strategy #1: Brute Force Most commonly used and least efficient method Used when all else fails Involves the use of memory dumps, run-time traces, and output statements Leads many times to wasted effort and time
28
28 Strategy #2: Backtracking Can be used successfully in small programs The method starts at the location where a symptom has been uncovered The source code is then traced backward (manually) until the location of the cause is found In large programs, the number of potential backward paths may become unmanageably large
29
29 Strategy #3: Cause Elimination Involves the use of induction or deduction and introduces the concept of binary partitioning Induction (specific to general): Prove that a specific starting value is true; then prove the general case is true Deduction (general to specific): Show that a specific conclusion follows from a set of general premises Data related to the error occurrence are organized to isolate potential causes A cause hypothesis is devised, and the aforementioned data are used to prove or disprove the hypothesis Alternatively, a list of all possible causes is developed, and tests are conducted to eliminate each cause If initial tests indicate that a particular cause hypothesis shows promise, data are refined in an attempt to isolate the bug
30
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.30 Final Thoughts Think -- before you act to correct Use tools to gain additional insight If you’re at an impasse, get help from someone else Once you correct the bug, use regression testing to uncover any side effects
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.