SlideShare uma empresa Scribd logo
1 de 31
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 ,[object Object],[object Object],[object Object],[object Object]
Testing Strategy unit test integration test validation test system test
Testing Strategy ,[object Object],[object Object],[object Object],[object Object],[object Object]
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 ,[object Object],[object Object],[object Object]
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 ,[object Object],[object Object]
High Order Testing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What is a “Good” Test? ,[object Object]
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

Mais conteúdo relacionado

Mais procurados

Integration testing
Integration testingIntegration testing
Integration testingqueen jemila
 
Software quality
Software qualitySoftware quality
Software qualityjagadeesan
 
Software Testing Fundamentals
Software Testing FundamentalsSoftware Testing Fundamentals
Software Testing FundamentalsChankey Pathak
 
Types of software testing
Types of software testingTypes of software testing
Types of software testingPrachi Sasankar
 
Software Metrics - Software Engineering
Software Metrics - Software EngineeringSoftware Metrics - Software Engineering
Software Metrics - Software EngineeringDrishti Bhalla
 
Software engineering : Layered Architecture
Software engineering : Layered ArchitectureSoftware engineering : Layered Architecture
Software engineering : Layered ArchitectureMuhammed Afsal Villan
 
Metrics for project size estimation
Metrics for project size estimationMetrics for project size estimation
Metrics for project size estimationNur Islam
 
Fundamental design concepts
Fundamental design conceptsFundamental design concepts
Fundamental design conceptssrijavel
 
Artificial Intelligence: The Nine Phases of the Expert System Development Lif...
Artificial Intelligence: The Nine Phases of the Expert System Development Lif...Artificial Intelligence: The Nine Phases of the Expert System Development Lif...
Artificial Intelligence: The Nine Phases of the Expert System Development Lif...The Integral Worm
 
Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assuranceAman Adhikari
 
Spm software effort estimation
Spm software effort estimationSpm software effort estimation
Spm software effort estimationKanchana Devi
 
Software Engineering Layered Technology Software Process Framework
Software Engineering  Layered Technology Software Process FrameworkSoftware Engineering  Layered Technology Software Process Framework
Software Engineering Layered Technology Software Process FrameworkJAINAM KAPADIYA
 
Project control and process instrumentation
Project control and process instrumentationProject control and process instrumentation
Project control and process instrumentationKuppusamy P
 
Coding and testing in Software Engineering
Coding and testing in Software EngineeringCoding and testing in Software Engineering
Coding and testing in Software EngineeringAbhay Vijay
 

Mais procurados (20)

Cohesion and coupling
Cohesion and couplingCohesion and coupling
Cohesion and coupling
 
Integration testing
Integration testingIntegration testing
Integration testing
 
Software quality
Software qualitySoftware quality
Software quality
 
Software Testing Fundamentals
Software Testing FundamentalsSoftware Testing Fundamentals
Software Testing Fundamentals
 
Black box & white-box testing technique
Black box & white-box testing techniqueBlack box & white-box testing technique
Black box & white-box testing technique
 
Types of software testing
Types of software testingTypes of software testing
Types of software testing
 
Software Metrics - Software Engineering
Software Metrics - Software EngineeringSoftware Metrics - Software Engineering
Software Metrics - Software Engineering
 
Software engineering : Layered Architecture
Software engineering : Layered ArchitectureSoftware engineering : Layered Architecture
Software engineering : Layered Architecture
 
Software Engineering by Pankaj Jalote
Software Engineering by Pankaj JaloteSoftware Engineering by Pankaj Jalote
Software Engineering by Pankaj Jalote
 
Software design
Software designSoftware design
Software design
 
Metrics for project size estimation
Metrics for project size estimationMetrics for project size estimation
Metrics for project size estimation
 
Fundamental design concepts
Fundamental design conceptsFundamental design concepts
Fundamental design concepts
 
Artificial Intelligence: The Nine Phases of the Expert System Development Lif...
Artificial Intelligence: The Nine Phases of the Expert System Development Lif...Artificial Intelligence: The Nine Phases of the Expert System Development Lif...
Artificial Intelligence: The Nine Phases of the Expert System Development Lif...
 
Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assurance
 
Spm software effort estimation
Spm software effort estimationSpm software effort estimation
Spm software effort estimation
 
System testing
System testingSystem testing
System testing
 
Software Engineering Layered Technology Software Process Framework
Software Engineering  Layered Technology Software Process FrameworkSoftware Engineering  Layered Technology Software Process Framework
Software Engineering Layered Technology Software Process Framework
 
Software testing
Software testing Software testing
Software testing
 
Project control and process instrumentation
Project control and process instrumentationProject control and process instrumentation
Project control and process instrumentation
 
Coding and testing in Software Engineering
Coding and testing in Software EngineeringCoding and testing in Software Engineering
Coding and testing in Software Engineering
 

Semelhante a Slides chapters 13-14

Software testing
Software testingSoftware testing
Software testingBala Ganesh
 
software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbjeyasrig
 
Software testing mtech project in jalandhar
Software testing mtech project in jalandharSoftware testing mtech project in jalandhar
Software testing mtech project in jalandhardeepikakaler1
 
Software testing mtech project in ludhiana
Software testing mtech project in ludhianaSoftware testing mtech project in ludhiana
Software testing mtech project in ludhianadeepikakaler1
 
lec-11 Testing.ppt
lec-11 Testing.pptlec-11 Testing.ppt
lec-11 Testing.pptdebjani12
 
6months industrial training in software testing, jalandhar
6months industrial training in software testing, jalandhar6months industrial training in software testing, jalandhar
6months industrial training in software testing, jalandhardeepikakaler1
 
6 weeks summer training in software testing,ludhiana
6 weeks summer training in software testing,ludhiana6 weeks summer training in software testing,ludhiana
6 weeks summer training in software testing,ludhianadeepikakaler1
 
6 weeks summer training in software testing,jalandhar
6 weeks summer training in software testing,jalandhar6 weeks summer training in software testing,jalandhar
6 weeks summer training in software testing,jalandhardeepikakaler1
 
6months industrial training in software testing, ludhiana
6months industrial training in software testing, ludhiana6months industrial training in software testing, ludhiana
6months industrial training in software testing, ludhianadeepikakaler1
 
Testing Software Solutions
Testing Software SolutionsTesting Software Solutions
Testing Software Solutionsgavhays
 
Software Testing Tecniques
Software Testing TecniquesSoftware Testing Tecniques
Software Testing Tecniquesersanbilik
 
4. The Software Development Process - Testing
4. The Software Development Process - Testing4. The Software Development Process - Testing
4. The Software Development Process - TestingForrester High School
 
5.Black Box Testing and Levels of Testing.ppt
5.Black Box Testing and Levels of Testing.ppt5.Black Box Testing and Levels of Testing.ppt
5.Black Box Testing and Levels of Testing.pptSyedAhmad732853
 

Semelhante a Slides chapters 13-14 (20)

Software testing
Software testingSoftware testing
Software testing
 
Software testing
Software testingSoftware testing
Software testing
 
software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblb
 
testing
testingtesting
testing
 
Software testing (2)
Software testing (2)Software testing (2)
Software testing (2)
 
Software testing mtech project in jalandhar
Software testing mtech project in jalandharSoftware testing mtech project in jalandhar
Software testing mtech project in jalandhar
 
Software testing mtech project in ludhiana
Software testing mtech project in ludhianaSoftware testing mtech project in ludhiana
Software testing mtech project in ludhiana
 
Software testing methods
Software testing methodsSoftware testing methods
Software testing methods
 
Testing
TestingTesting
Testing
 
lec-11 Testing.ppt
lec-11 Testing.pptlec-11 Testing.ppt
lec-11 Testing.ppt
 
6months industrial training in software testing, jalandhar
6months industrial training in software testing, jalandhar6months industrial training in software testing, jalandhar
6months industrial training in software testing, jalandhar
 
6 weeks summer training in software testing,ludhiana
6 weeks summer training in software testing,ludhiana6 weeks summer training in software testing,ludhiana
6 weeks summer training in software testing,ludhiana
 
6 weeks summer training in software testing,jalandhar
6 weeks summer training in software testing,jalandhar6 weeks summer training in software testing,jalandhar
6 weeks summer training in software testing,jalandhar
 
6months industrial training in software testing, ludhiana
6months industrial training in software testing, ludhiana6months industrial training in software testing, ludhiana
6months industrial training in software testing, ludhiana
 
Testing Software Solutions
Testing Software SolutionsTesting Software Solutions
Testing Software Solutions
 
Testing
TestingTesting
Testing
 
Software Testing Tecniques
Software Testing TecniquesSoftware Testing Tecniques
Software Testing Tecniques
 
Blackbox
BlackboxBlackbox
Blackbox
 
4. The Software Development Process - Testing
4. The Software Development Process - Testing4. The Software Development Process - Testing
4. The Software Development Process - Testing
 
5.Black Box Testing and Levels of Testing.ppt
5.Black Box Testing and Levels of Testing.ppt5.Black Box Testing and Levels of Testing.ppt
5.Black Box Testing and Levels of Testing.ppt
 

Mais de Priyanka Shetty (19)

Slides chapters 24-25
Slides chapters 24-25Slides chapters 24-25
Slides chapters 24-25
 
Slides chapters 21-23
Slides chapters 21-23Slides chapters 21-23
Slides chapters 21-23
 
Slides chapters 6-7
Slides chapters 6-7Slides chapters 6-7
Slides chapters 6-7
 
Slides chapter 19
Slides chapter 19Slides chapter 19
Slides chapter 19
 
Slides chapter 17
Slides chapter 17Slides chapter 17
Slides chapter 17
 
Slides chapter 16
Slides chapter 16Slides chapter 16
Slides chapter 16
 
Slides chapter 15
Slides chapter 15Slides chapter 15
Slides chapter 15
 
Slides chapter 12
Slides chapter 12Slides chapter 12
Slides chapter 12
 
Slides chapter 11
Slides chapter 11Slides chapter 11
Slides chapter 11
 
Slides chapter 10
Slides chapter 10Slides chapter 10
Slides chapter 10
 
Slides chapter 9
Slides chapter 9Slides chapter 9
Slides chapter 9
 
Slides chapter 8
Slides chapter 8Slides chapter 8
Slides chapter 8
 
Slides chapter 5
Slides chapter 5Slides chapter 5
Slides chapter 5
 
Slides chapter 3
Slides chapter 3Slides chapter 3
Slides chapter 3
 
Slides chapter 2
Slides chapter 2Slides chapter 2
Slides chapter 2
 
Slides chapter 1
Slides chapter 1Slides chapter 1
Slides chapter 1
 
Slides chapters 28-32
Slides chapters 28-32Slides chapters 28-32
Slides chapters 28-32
 
Slides chapters 26-27
Slides chapters 26-27Slides chapters 26-27
Slides chapters 26-27
 
Personal Hygiene
Personal HygienePersonal Hygiene
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.
  • 6. Testing Strategy unit test integration test validation test system test
  • 7.
  • 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.
  • 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.
  • 15.
  • 16.
  • 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