back

by jader201·14y ago·view on hn ↗
If you read Pragmatic Unit Testing[1], it talks about how writing tests actually takes less time than building a project without tests, in the long run.

First of all, it's possible to actually ship a product that was built with tests quicker than one that was not built with tests. This may not always be the case, but adding tests doesn't necessarily mean that it will add time, overall. It may feel like it's quicker to build an app without tests, but often the testing and bug fixing that happens at the end often exceeds the time it would have taken to build tests and eliminate most of the testing/bug fixing at the end.

Second, bypassing testing rarely saves time in the long run, especially for apps that continually require maintenance to existing code. Regression almost always occurs, and sometimes this isn't caught until production.

Unfortunately, it's a hard sell to clients, and depending on how well you are at covering this up, it often goes unrealized.

[1] http://pragprog.com/book/utj/pragmatic-unit-testing-in-java-...

1 comments
While I agree with you, it's a very tough sale if you're consulting for a company without a strong programming department. I find that companies plan for best-case scenario and deal with the consequences thereafter. Bugs are usually considered a programming mistake, even while acknowledging that poor planning plays a part.