The document provides techniques for estimating the risk level and number of defects in code during testing. It discusses counting previous defects, investigating code coverage, assigning risk scores, and using metrics like cyclomatic complexity and bug level to estimate risk for functionality. It also outlines techniques for deciding when sufficient testing has been done, such as looking for a plateau in detected defects and ensuring test cases fully exercise the code. Methods for estimating the number of defects include using the number of requirements, lines of code, similar previous projects, and defects found in prior phases.