Actualy this is one of the concern in S/W testing that when to stop testing. Its can be either one of the following attributes.
1> After completing the timeline of testing. 2>Certain number of error found. 3>error detection rate falls below the threshold. 4>Target test coverage attainded.
A product is ready to ship when the build meets the exit criteria that has been agreed upon by all stakeholders in the company. The exit criteria defines the number and nature (by Priority and Severity) of defects that the company can "live with" to remain open and unresolved at the time of software release to production.