One of the most important issues in the software development is how to guarantee that the software satisfies the quality defined in the requirement specification. This paper proposes that the issue can be solved, first the number of test cases is statistically calculated from the failure density defined in the requirement specification, then the selected test cases are executed basing on the hypothesis testing. This paper also present how our method can be used for debugging. When the number of the test cases is calculated, we applied the statistical behavior of the software quality to the integration testing. We, however, did not consider the ripple effect since it is unable to measure. In order to guarantee the quality of Aσ and 5σ, we found that many more test cases are needed than is previously believed enough.