loading...

Discussion on: Software Testing 101: Get started with software testing types

Collapse
eljayadobe profile image
Eljay-Adobe

Joe Rainsberger has said that 98% of all bugs are basic correctness bugs, and unit testing can catch all of those kinds of bugs. (A bold, brash statement. But I think Joe is awesome. Probably overstated, and closer to 97%.)

Unit testing is an oddity in the mix. Because 1) the unit tests are written by developers rather than QE, and 2) the unit tests are run against a debug build rather than an optimized release build, and 3) the unit tests are really a mechanism to help develop the software rather than actually about testing at all. (In that there is a suite of unit tests afterwards is a tertiary byproduct benefit.)

But having a suite of unit tests is not free. The unit tests themselves require ongoing maintenance as the codebase evolves. Which is why James Coplien recommends deleting unit tests that are over a year old, to reduce muda (waste, as per 5S).

The one project I was on that went heavy with unit testing was a joy to work on. (Yes, unit testing: a joy!) But that was because it was a C# project, running on .NET, using Visual Studio, with NUnit and NCrunch and ReSharper. NCrunch was nothing short of magical, and made unit testing fun.

I prefer xUnit.net to NUnit, but that's nitpicking, and they're both decent.

I liked ReSharper, but others like CodeRush. Both good.