Chapter  13 & 14 Software Testing Strategies and Techniques   Software Engineering: A Practitioner’s Approach, 6th edition...
Software Testing Testing is the process of exercising a program with the specific intent of finding errors prior to delive...
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 dri...
Validation vs Verification <ul><li>Verification  – Are we building the product right? </li></ul><ul><ul><li>Is the code co...
Testing Strategy unit test integration test validation test system test
Testing Strategy <ul><li>Begin with unit testing and work your way up to system testing. </li></ul><ul><li>Unit testing – ...
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 test...
Unit Test Environment Module stub stub driver RESULTS interface  local data structures boundary conditions independent pat...
Integration Testing Strategies <ul><li>Options: </li></ul><ul><ul><li>• the “big bang” approach </li></ul></ul><ul><ul><li...
Top Down Integration top module is tested with  stubs stubs are replaced one at  a time, &quot;depth first&quot; as new mo...
Bottom-Up Integration drivers are replaced one at a  time, &quot;depth first&quot; worker modules are grouped into  builds...
Regression Testing <ul><li>The selective retesting of a modified system to help ensure that no bugs have been introduced d...
High Order Testing <ul><li>Validation testing </li></ul><ul><ul><li>Focus is on software requirements </li></ul></ul><ul><...
What is a “Good” Test? <ul><li>A good test is one that has a high probability of finding an error. </li></ul>
Test Case Design &quot;Bugs lurk in corners  and congregate at  boundaries ...&quot; Boris Beizer OBJECTIVE CRITERIA CONST...
Exhaustive Testing loop < 20 X There are 10  possible paths! If we execute one test per millisecond, it would take 3,170 y...
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 ...
Basis Path Testing First, we compute the cyclomatic  complexity: number of simple decisions + 1  or number of enclosed are...
Cyclomatic Complexity A number of industry studies have indicated  that the higher V(G), the higher the probability  or er...
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 ...
Basis Path Testing Notes you don't need a flow chart,  but the picture will help when  you trace program paths count each ...
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 param...
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 s...
Upcoming SlideShare
Loading in...5
×

Slides chapters 13-14

3,944

Published on

Software Engineering
By Roger Pressman

3 Comments
2 Likes
Statistics
Notes
  • A very good work @priyanka shetty.... i like your material... keep it iup
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • I don't have any slides I just have hard copy book
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • can u pls give me the slides for chapters 2,3,8,9,10,11
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
3,944
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
326
Comments
3
Likes
2
Embeds 0
No embeds

No notes for slide

Slides chapters 13-14

  1. 1. Chapter 13 & 14 Software Testing Strategies and Techniques Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman
  2. 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. 3. What Testing Shows errors requirements conformance performance an indication of quality
  4. 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. 5. Validation vs Verification <ul><li>Verification – Are we building the product right? </li></ul><ul><ul><li>Is the code correct with respect to its specification? </li></ul></ul><ul><li>Validation – Are we building the right product? </li></ul><ul><ul><li>Does the specification reflect what it should? </li></ul></ul>
  6. 6. Testing Strategy unit test integration test validation test system test
  7. 7. Testing Strategy <ul><li>Begin with unit testing and work your way up to system testing. </li></ul><ul><li>Unit testing – test individual components (modules in procedural languages; classes in OO languages) </li></ul><ul><li>Integration testing – test collections of components that must work together </li></ul><ul><li>Validation testing – test the application as a whole against user requirements </li></ul><ul><li>System testing – test the application in the context of an entire system </li></ul>
  8. 8. Unit Testing module to be tested test cases results software engineer
  9. 9. Unit Testing interface local data structures boundary conditions independent paths error handling paths module to be tested test cases
  10. 10. Unit Test Environment Module stub stub driver RESULTS interface local data structures boundary conditions independent paths error handling paths test cases
  11. 11. Integration Testing Strategies <ul><li>Options: </li></ul><ul><ul><li>• the “big bang” approach </li></ul></ul><ul><ul><li>• an incremental construction strategy </li></ul></ul>
  12. 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. 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. 14. Regression Testing <ul><li>The selective retesting of a modified system to help ensure that no bugs have been introduced during modification. </li></ul><ul><ul><li>Fixing one part of the code can break another </li></ul></ul>
  15. 15. High Order Testing <ul><li>Validation testing </li></ul><ul><ul><li>Focus is on software requirements </li></ul></ul><ul><li>System testing </li></ul><ul><ul><li>Focus is on system integration </li></ul></ul><ul><li>Alpha/Beta testing </li></ul><ul><ul><li>Focus is on customer usage </li></ul></ul><ul><li>Recovery testing </li></ul><ul><ul><li>forces the software to fail in a variety of ways and verifies that recovery is properly performed </li></ul></ul><ul><li>Security testing </li></ul><ul><ul><li>verifies that protection mechanisms built into a system will, in fact, protect it from improper penetration </li></ul></ul><ul><li>Stress testing </li></ul><ul><ul><li>executes a system in a manner that demands resources in abnormal quantity, frequency, or volume </li></ul></ul><ul><li>Performance Testing </li></ul><ul><ul><li>test the run-time performance of software within the context of an integrated system </li></ul></ul>
  16. 16. What is a “Good” Test? <ul><li>A good test is one that has a high probability of finding an error. </li></ul>
  17. 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. 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. 19. Selective Testing loop < 20 X Selected path
  20. 20. Software Testing Methods Strategies white-box methods black-box methods
  21. 21. White-Box Testing ... our goal is to ensure that all statements and conditions have been executed at least once ...
  22. 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. 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. 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. 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. 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. 27. Black-Box Testing requirements events input output
  28. 28. Equivalence Partitioning user queries mouse picks output formats prompts FK input data
  29. 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. 30. Boundary Value Analysis user queries mouse picks output formats prompts FK input data output domain input domain
  31. 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
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×