Most serious projects start off with unit tests as an important part of the development activity. Many managers insist that unit testing code be written even before the actual code. Gradually, however, as deadlines approach, unit tests are ignored. They lie untouched, reflecting the functionality as it was envisaged initially. Eventually, nobody has the time to update them. Which means that the effort spent to write them in the first place was a major waste of time.
I have never seen a real-world project in which the unit tests were meticulously maintained and used to the desired effect. It is merely good to say "We have unit testing code". It is entirely another story to actually have meaningful unit testing code.
They are simply not practical in the kind of projects we have today. Well, I am talking about the projects that most people work on. Software for critical projects like the Chandrayaan, for example, is an entirely different ball game. A single mistake in the code could have blown the mission. But not in the projects that you and I work on. Where deadlines are important.
So, here's my advice to software programmers and managers: don't bother with unit testing code.