1.3. Testing Myths

Some developers are required to explain every development practice and tool they'll need to create a piece of software to their managers; it's this manager who will then decide if the practice or tool is prudent for use. These managers are often developers that have been promoted, and their focus is no longer on development but managing. Former developers do not always make for the best managers; many times they don't keep their development skills sharp, and they can sometimes deny the use of new techniques and tools just because it's not the way that they do things. These situations do not make sense and are often hard for developers to handle, especially junior developers who are very eager to learn the latest and greatest technology.

Unit testing frameworks have been mainstream for roughly 10 years, but still, many managers fight developers who ask to implement unit testing frameworks. This section explores some of the popular myths around testing and helps give advice to the developer who is having issues implementing a testing regiment into their organization.

1.3.1. Testing Is Expensive

Frederick Brooks stated in his book of essays, The Mythical Man-Month, that "A bug found in the field can easily cost one thousand times more to resolve then one found in development."

If this is an argument that your manager uses, create a test to verify the functionality of the method that contains the bug and use it the next time the bug occurs — and time yourself. ...

Get Testing ASP.NET Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.