madhuwillb, we test software to make sure everything works. It has to work in different environments and must handle different types of output from different types of end users. Programmers do not know how the real world will handle their applications until after the software has been deployed, so testing is a complex way to simply run the software before the real world finds problems with it.
Also, programmers are not perfect, so the software they develop will not be perfect either. Proper testing will help make software function better.
I should write a hub about this.