The purpose of testing
The prime purpose of testing is to find bugs.
To quote Edsger Wybe Dijkstra: “Program testing can be a very effective way to show the presence of bugs, but is hopelessly inadequate for showing their absence.” (Edsger Wybe Dijkstra, The Humble Programmer, ACM Turing Lecture 1972)
Each developer should be interested in testing, because by finding bugs we’re able to fix them. We thereby increase the internal quality of our code and have time for activities that are usually way more fun: implementing new features!
Having an automated suite of tests (and running it regularly of course) will help to prevent the bugs from reappearing in the future, which frustrates everybody. This makes changing code safer and in general makes developer happier.
Tests can serve also a documentation purpose. And comparing to normal documentation is always up-to-date and never lies.
When talking to business people (e.g. managers), we should change our vocabulary and speak the language they know and understand. By finding bugs we reduce maintenance cost, increase both productivity and external quality. And new features can be sold! Try to sell the time spent with bug hunting…
And even the user is experiencing the results of our testing. The product is now more often doing what it is supposed to do and is somehow better. Therefore the product makes the user’s life better since it actually solves problems instead of generating new ones.