Thursday, January 17, 2008

CSE 2011 Lecture 5


 

Testing and Debugging

  • Create a test plan application that will probe the program with input and compare its output to see if the program is outputting the desired output from the test
  • Verification
    • Does the software meet its specifications
  • Validation
    • Does the software meet its requirements
  • Identify test criteria
    • What are the goats for comparing the system against its spec
      • Reliability, completeness, robustness
    • Identify target components for testing
      • In an OO system the classes and class hierarchies
    • Generate test cases
      • Produce test cases that can identify faults in an implementation
    • Execute test cases against target components
    • Evaluation
      • If expected outputs are not produced, a bug report is issued
  • Black box testing
    • Testing based on input and output alone
      • Do not consider underlying implementation
    • Test cases are generated from the spec
      • Pre and post conditions
    • Specific kinds of black box testing
      • Random testing
        • Generate random inputs
        • Easy to generate cases
        • Good at detecting failures
        • Must be able to easily generate expected output
      • Partition testing
        • Cannot try all possibly inputs
          • Partition input into equivalence classes
          • Every value in a class should behave similarly
        • Test cases
          • Just before the boundary
          • Just after the boundary
          • On a boundary
          • One from the middle of an equivalence class
        • Loops
          • Zero times through the body
          • Once through the body many times through the body

No comments: