Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Pa chapter08-testing integrating-the_programs-cs_390


Published on

Published in: Technology, Education
  • Be the first to comment

Pa chapter08-testing integrating-the_programs-cs_390

  1. 1. Program Testing +Integration TestingZeeshan Rana
  2. 2.  Types of faults and how to clasify them The purpose of testing Unit testing Integration testing strategies Test planning When to stop testing
  3. 3.  Wrong requirement: not what the customerwants Missing requirement Requirement impossible to implement Faulty design Faulty code Improperly implemented design
  4. 4.  Objective of testing: discover faults A test is successful only when a fault isdiscovered◦ Fault identification is the process of determiningwhat fault caused the failure◦ Fault correction is the process of making changesto the system so that the faults are removed
  5. 5.  Purpose Input Expected Output Actual Output Sample Format:
  6. 6.  Algorithmic fault Computation and precision fault◦ a formula’s implementation is wrong Documentation fault◦ Documentation doesn’t match what program does Capacity or boundary faults◦ System’s performance not acceptable when certain limitsare reached Timing or coordination faults Performance faults◦ System does not perform at the speed prescribed
  7. 7.  An algorithmic fault occurs when acomponent’s algorithm or logic does notproduce proper output◦ Branching too soon◦ Branching too late◦ Forgetting to initialize variable or set loopinvariants◦ Comparing variables of inappropriate data types
  8. 8.  Module testing, component testing, or unittesting Integration testing System Testing◦ Function testing◦ Performance testing Acceptance testing Installation testing
  9. 9.  Egoless programming: programs are viewedas components of a larger system, not as theproperty of those who wrote them
  10. 10.  Independent test team◦ avoid conflict◦ improve objectivity◦ allow testing and coding concurrently
  11. 11.  Closed box or black box: functionality of thetest objects◦ Equivalence Class, Boundary Value Analysis,Scenario-based, Decision Table based, StateMachine based… Clear box or white box: structure of the testobjects◦ Control Flow Basis Path, Branch, Statement, Decision…◦ Data Flow Du Path, All-uses Path
  12. 12.  Black box: external behavior description State box: black box with state information White box: state box with a procedure
  13. 13.  Code walkthrough Code inspection
  14. 14.  Testing the unit for correct functionality Testing the unit for correct execution
  15. 15.  Determining test objectives Selecting test cases Executing test cases
  16. 16.  Statement testing Branch testing Path testing …
  17. 17. Cyclomatic Complexity = E – N + 2 = 9 – 9 + 2 = 2
  18. 18. • Effectiveness of fault-discovery techniquesRequirementsFaults Design Faults Code FaultsDocumentationFaultsReviews Fair Excellent Excellent GoodPrototypes Good Fair Fair Not applicableTesting Poor Poor Good FairCorrectness Proofs Poor Poor Fair Fair
  19. 19.  Big-bang Bottom-up Top-down Sandwich testing
  20. 20.  Component Driver: a routine that calls aparticular component and passes a test caseto it Stub: a special-purpose program to simulatethe activity of the missing component
  21. 21.  System viewed as a hierarchy of components
  22. 22.  All components integrated at once Locating faults?
  23. 23.  Only A is tested by itself Stubs of B, C and D are used at first level N-1 stubs required (N=Number of nodes) Locating faults?
  24. 24.  Drivers are used to call the child functions Drivers are relatively intelligent N-leaves drivers Locating faults?
  25. 25.  Viewed system as three layers Employ BU wherewriting drivers isnot costly Employ TD wherestubs are easier toWrite Locating faults?
  26. 26. • Adjacency Matrix• NxN matrix that tells which components callthe other components• Pairwise Integration• Test each pair (i.e. each edge)• E testing sessions• Neighborhood based Integration• Integrate each neighborhood• The nodes at one edge distance from thenode to be integrated• N-sink nodes sessions
  27. 27.  Establish test objectives Design and Write test cases Test test cases Execute tests Evaluate test results
  28. 28.  Test plan explains◦ who does the testing◦ why the tests are performed◦ how tests are conducted◦ when the tests are scheduled
  29. 29.  What the test objectives are How the test will be run What criteria will be used to determine whenthe testing is complete
  30. 30.  Automated Testing Tools Testing Management Tools Bug Tracking/Configuration ManagementTools
  31. 31.  No time left No money left Statistical Criteria◦ Number of defects found per week becomeslower than a set threshold
  32. 32.  The Ariane-5’s flight control system wastested in four ways◦ equipment testing◦ on-board computer software testing◦ staged integration◦ system validation tests The Ariane-5 developers relied on insufficientreviews and test coverage
  33. 33.  It is important to understand the differencebetween faults and failures The goal of testing is to find faults, not toprove correctness
  34. 34.  UCF Slides Software Testing, A Craftsman’s Approach byJorgensen Software Testing Tools by Prasad