Testing- Should be prioritized with most important functions and nonfunctional behaviors tested first. Completion criteria should be set in order to define when to stop testing. Prioritization and completion criteria provide the basis of planning. Testing is also done to meet contractual or legal requirements and industry specific standards.
Debugging is done by developers to locate bugs in code.Debugging is essential to raise the level of a software so that it is worth testing i.e. software is robust enough so that rigorous testing can be performed.