SlideShare a Scribd company logo
Chapter  13 & 14 Software Testing Strategies and Techniques   Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman
Software Testing 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 errors requirements conformance performance an indication of quality
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
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?
Testing Strategy unit test integration test validation test system test
Testing Strategy Begin with unit testing and work your way up to system testing. Unit testing – test individual components (modules in procedural languages; classes in OO languages) Integration testing – test collections of components that must work together Validation testing – test the application as a whole against user requirements System testing – test the application in the context of an entire system
Unit Testing module to be tested test cases results software engineer
Unit Testing interface  local data structures boundary conditions independent paths error handling paths module to be tested test cases
Unit Test Environment Module stub stub driver RESULTS interface  local data structures boundary conditions independent paths error handling paths test cases
Integration Testing Strategies Options: • the “big bang” approach • an incremental construction strategy
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 D E F G
Bottom-Up Integration drivers are replaced one at a  time, "depth first" worker modules are grouped into  builds and integrated A B C D E F G 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
High Order Testing Validation testing Focus is on software requirements System testing Focus is on system integration Alpha/Beta testing Focus is on customer usage Recovery testing forces the software to fail in a variety of ways and verifies that recovery is properly performed Security testing verifies that protection mechanisms built into a system will, in fact, protect it from improper penetration Stress testing executes a system in a manner that demands resources in abnormal quantity, frequency, or volume 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.
Test Case Design "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 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 loop < 20 X Selected path
Software Testing 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? logic errors and incorrect assumptions  are inversely proportional to a path's  execution probability we often  believe 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 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 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 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,7,8 Path 4:  1,2,4,7,2,4,...7,8 Finally, we derive test cases to exercise these  paths. 1 2 3 4 5 6 7 8
Basis Path Testing Notes 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 requirements events input output
Equivalence Partitioning user queries mouse picks output formats prompts FK input data
Sample Equivalence Classes 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 user queries mouse picks output formats prompts FK input data output domain input domain
OOT Methods: Behavior Testing 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

More Related Content

PDF
Software testing methods, levels and types
PPTX
Software quality assurance
PPT
Software Quality Metrics
PDF
Software Testing Life Cycle (STLC) | Software Testing Tutorial | Edureka
PPT
Unit 8
PDF
Types of software testing
PDF
STLC (Software Testing Life Cycle)
PDF
Testing methodology
Software testing methods, levels and types
Software quality assurance
Software Quality Metrics
Software Testing Life Cycle (STLC) | Software Testing Tutorial | Edureka
Unit 8
Types of software testing
STLC (Software Testing Life Cycle)
Testing methodology

What's hot (20)

PPT
Software Prototyping
PPTX
Defect prevention
PPTX
Unified process Model
PPT
Software Testing
PPT
Object Oriented Analysis and Design
PPT
Software Testing Fundamentals
PPTX
Requirements analysis and modeling
PDF
PPT
Chapter 15 software product metrics
PPTX
The Problem Tracking System
PPTX
Testing strategies part -1
PPT
10 component diagram
PDF
Software Testing Techniques: An Overview
PPT
Software design
PPTX
Capability Maturity Model Integration (CMMI)
PPT
Basic software-testing-concepts
PDF
Testing plan for an ecommerce site
PPTX
Lab 3 Introduction to the UML - how to create a use case diagram
PPT
Manual testing concepts course 1
PPTX
System testing
Software Prototyping
Defect prevention
Unified process Model
Software Testing
Object Oriented Analysis and Design
Software Testing Fundamentals
Requirements analysis and modeling
Chapter 15 software product metrics
The Problem Tracking System
Testing strategies part -1
10 component diagram
Software Testing Techniques: An Overview
Software design
Capability Maturity Model Integration (CMMI)
Basic software-testing-concepts
Testing plan for an ecommerce site
Lab 3 Introduction to the UML - how to create a use case diagram
Manual testing concepts course 1
System testing
Ad

Similar to Slides chapters 13-14 (20)

PPT
Software testing
PPTX
Software testing
PPTX
software testing types jxnvlbnLCBNFVjnl/fknblb
PPT
testing
PPTX
Software testing (2)
PPT
Software testing mtech project in jalandhar
PPT
Software testing mtech project in ludhiana
PPTX
Software testing methods
PPT
Testing
PPT
lec-11 Testing.ppt
PPT
6months industrial training in software testing, jalandhar
PPT
6 weeks summer training in software testing,ludhiana
PPT
6months industrial training in software testing, ludhiana
PPT
6 weeks summer training in software testing,jalandhar
PPT
Testing Software Solutions
PPT
Testing
PPT
Software Testing Tecniques
PPTX
Blackbox
PDF
4. The Software Development Process - Testing
PPT
software-testing-strategies888888888.ppt
Software testing
Software testing
software testing types jxnvlbnLCBNFVjnl/fknblb
testing
Software testing (2)
Software testing mtech project in jalandhar
Software testing mtech project in ludhiana
Software testing methods
Testing
lec-11 Testing.ppt
6months industrial training in software testing, jalandhar
6 weeks summer training in software testing,ludhiana
6months industrial training in software testing, ludhiana
6 weeks summer training in software testing,jalandhar
Testing Software Solutions
Testing
Software Testing Tecniques
Blackbox
4. The Software Development Process - Testing
software-testing-strategies888888888.ppt
Ad

More from Priyanka Shetty (19)

PPT
Slides chapters 24-25
PPT
Slides chapters 21-23
PPT
Slides chapters 6-7
PPT
Slides chapter 19
PPT
Slides chapter 17
PPT
Slides chapter 16
PPT
Slides chapter 15
PPT
Slides chapter 12
PPT
Slides chapter 11
PPT
Slides chapter 10
PPT
Slides chapter 9
PPT
Slides chapter 8
PPT
Slides chapter 5
PPT
Slides chapter 3
PPT
Slides chapter 2
PPT
Slides chapter 1
PPT
Slides chapters 28-32
PPT
Slides chapters 26-27
PPT
Personal Hygiene
Slides chapters 24-25
Slides chapters 21-23
Slides chapters 6-7
Slides chapter 19
Slides chapter 17
Slides chapter 16
Slides chapter 15
Slides chapter 12
Slides chapter 11
Slides chapter 10
Slides chapter 9
Slides chapter 8
Slides chapter 5
Slides chapter 3
Slides chapter 2
Slides chapter 1
Slides chapters 28-32
Slides chapters 26-27
Personal Hygiene

Slides chapters 13-14

  • 1. Chapter 13 & 14 Software Testing Strategies and Techniques Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman
  • 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. What Testing Shows errors requirements conformance performance an indication of quality
  • 4. Who Tests the Software? developer independent tester Understands the system but, will test &quot;gently&quot; and, is driven by &quot;delivery&quot; Must learn about the system, but, will attempt to break it and, is driven by quality
  • 5. 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?
  • 6. Testing Strategy unit test integration test validation test system test
  • 7. Testing Strategy Begin with unit testing and work your way up to system testing. Unit testing – test individual components (modules in procedural languages; classes in OO languages) Integration testing – test collections of components that must work together Validation testing – test the application as a whole against user requirements System testing – test the application in the context of an entire system
  • 8. Unit Testing module to be tested test cases results software engineer
  • 9. Unit Testing interface local data structures boundary conditions independent paths error handling paths module to be tested test cases
  • 10. Unit Test Environment Module stub stub driver RESULTS interface local data structures boundary conditions independent paths error handling paths test cases
  • 11. Integration Testing Strategies Options: • the “big bang” approach • an incremental construction strategy
  • 12. Top Down Integration top module is tested with stubs stubs are replaced one at a time, &quot;depth first&quot; as new modules are integrated, some subset of tests is re-run A B C D E F G
  • 13. Bottom-Up Integration drivers are replaced one at a time, &quot;depth first&quot; worker modules are grouped into builds and integrated A B C D E F G cluster
  • 14. 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
  • 15. High Order Testing Validation testing Focus is on software requirements System testing Focus is on system integration Alpha/Beta testing Focus is on customer usage Recovery testing forces the software to fail in a variety of ways and verifies that recovery is properly performed Security testing verifies that protection mechanisms built into a system will, in fact, protect it from improper penetration Stress testing executes a system in a manner that demands resources in abnormal quantity, frequency, or volume Performance Testing test the run-time performance of software within the context of an integrated system
  • 16. What is a “Good” Test? A good test is one that has a high probability of finding an error.
  • 17. Test Case Design &quot;Bugs lurk in corners and congregate at boundaries ...&quot; Boris Beizer OBJECTIVE CRITERIA CONSTRAINT to uncover errors in a complete manner with a minimum of effort and time
  • 18. Exhaustive Testing 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
  • 19. Selective Testing loop < 20 X Selected path
  • 20. Software Testing Methods Strategies white-box methods black-box methods
  • 21. White-Box Testing ... our goal is to ensure that all statements and conditions have been executed at least once ...
  • 22. Why Cover? logic errors and incorrect assumptions are inversely proportional to a path's execution probability we often believe 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
  • 23. Basis Path Testing First, we compute the cyclomatic complexity: number of simple decisions + 1 or number of enclosed areas + 1 In this case, V(G) = 4
  • 24. Cyclomatic Complexity 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
  • 25. Basis Path Testing 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,7,8 Path 4: 1,2,4,7,2,4,...7,8 Finally, we derive test cases to exercise these paths. 1 2 3 4 5 6 7 8
  • 26. Basis Path Testing Notes 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
  • 27. Black-Box Testing requirements events input output
  • 28. Equivalence Partitioning user queries mouse picks output formats prompts FK input data
  • 29. Sample Equivalence Classes 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
  • 30. Boundary Value Analysis user queries mouse picks output formats prompts FK input data output domain input domain
  • 31. OOT Methods: Behavior Testing 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