The end result was that they had to hire outside person to fix what they have produced. I looked through the software and noticed whole bunch of iffy patterns. Ended up writing giant Python script that searched said patterns and fixed it where possible marking with appropriate comments and issued a warning comments where it could not.
Not sure if this is a regular occurrence in companies that write and maintain their internal software as this was the only time I did job like this.
I can't imagine the kind of software that wouldn't benefit from automatic testing (unless you would be writing the simplest of CRUD web apps or doing it completely wrong).
From personal experience I see both better code design from being forced to make the code testable and less bugs due to writing tests revealing bugs I wouldn't have found with manual testing before they go into production.
In my experience once people learn about tests, they want to see 1. tests per commit and 2. high code coverage. This leads to unit tests, which don't really test much of anything, and what they do test (the layers under you like the compiler) is by accident.
The most useful testing would be integration tests on the side, and then regression tests because they're guaranteed to have already found at least one bug.
[1] To different servers that return different information for a given query. The protocol happens to be DNS.
[2] Based upon poll(), epoll() or kqueue(), depending upon the platform.
[3] We're under some pretty tight time constraints for our product.
[4] DNS, over UDP.
Unit tests are a tool to get you to working code.
Also I don't agree with GP, there are places that require unit tests, especially if multiple people are working on a project. You could be a developer that never made a bug in your life, but others might not be as great :) besides many bugs also happen by changing other parts of the code. Some of your assumptions might have been 100% correct when you wrote the code, but someone can change different part of the code and now your function is called with values that were previously impossible.
The great thing about statically typed languages is that they might detect large part of these bugs, but you're out of luck with dynamically typed languages.
Example of this was the Python 2 -> Python 3 migration. Having a large test suite helped tremendously.
Using tests as a way of finding problems seems like not a great way of saying code has issues x,y, and z but they are a great of saying something does a, b, c. If you are going through a refactor you might not be implementing a, b or c correctly anymore and if your tests are designed well this will be caught.
If we are only talking about bug catching, you are right there are better tools. But I'll say if somebody says code does something and there are no tests demonstrating that fact, I don't trust it generally unless it's something like a game where it's hard to test certain things.
there are two different types of formal proofs:
1. there is at least one error in the code, or
2. there are no errors at all
The [1] is much easier than [2].
You are paid to write working code.