Google interview question

Describe how testing should be used in the software development cycle