Code Coverage & Test Driven development

  1. What is white box testing
    Testing the internal structures and working of the application
  2. When is white box testing performed?
    At unit testing level
  3. Disadvantage of white box testing
    Won't find missing functionality or requirements
  4. White box testing techniques
    • Control flow testing
    • Data flow testing
    • Branch testing
    • Path testing
    • Exception handling testing
    • Thread safety testing
    • Resource constraints testing
  5. What is white hat hacking
    Penetration testing where the tester has some malicious intruder that has some knowledge and/or credentials for the system
  6. When is testing complete
    • Deadlines are up
    • Test cases complete and a certain number passed
    • Test budget depleted
    • Beta or alpha testing has ended
    • Coverage of code and functionality requirements reach a specified point
  7. Types of code coverage
    • Function coverage
    • Statement coverage - Line execution
    • Decision coverage - Branches of control structures
    • Condition coverage - Sub-expression evaluation (to T or F)
    • Exception coverage - Try/Catch blocks
  8. Properties of test driven development
    • Inverts traditional dev/test process
    • No code is written unless a failing test case exists
    • Refactor to eliminate duplication
  9. Test driven development lifecycle
    • Write test cases
    • Run test cases
    • Fix/write code for failed test cases (will be all if no code exists)

    • Refactor
    • Test again
  10. Benefits of test driven development
    • Encourages simple designs
    • Inspires confidence
    • Ensures system is testable
    • A test for every feature exists
    • Encourage focus on interface over implementation
    • Encourage focus on simpler tasks (passing a test)
    • Faster bug discovery
    • Improves code implementation time
  11. Writing tests against blank/minimal code is a good idea because:
    • It ensures that tests really work
    • The tests will catch errors
  12. Situations where test driven development is ineffective
    • GUI testing - Requires full functional testing
    • Database interactions - Requires full functional testing
    • Dependent on network configuration - Requires full functional testing
    • No management buy-in
  13. Main weakness of test driven development
    Tests are usually written by the developer, so code can have blind spots
Author
Ant
ID
353593
Card Set
Code Coverage & Test Driven development
Description
cover
Updated