http://www.satisfice.com/articles/how_much.shtml
till no possibility of any bugs.
Till you get bored and time of deployment.
Testing the application as per the client requirement is the answer for your question. As testers are limited to test a application. Tester should not go beyond the client requirements. Checking the application is working as per client or not.How ever we have entry and exit criteria for testing and to decide how much testing is enough.
It is depends on the risk for your industry, contract ,special requirements and budget or cost of project.