At some point, you need to release your product to the public. When does testing stop? For practical reasons, the criterion is usually a specific amount of time during which bugs of a certain priority level have not been found, or a mathematical equation like that previously mentioned estimating the number of bugs remaining in the code. Other companies stop testing when they feel adequate test coverage has been given to the game design. And sadly, some companies stop when they run up against the final milestone deadline. Plan ahead and choose a criterion—and do so when you design your test cases, not when the deadline catches up with you.
Careful planning and accurate testing will help you avoid the stigma of a post-release patch. By testing often and testing early with a tracking system in place, a quality assurance manager can avoid many pitfalls that can delay a game's path to the marketplace.