Geeks With Blogs
Patrice Calve Life's short, have fun

The Current state of Unit Testing in the software industry.

10 years ago, when the web boom started and applications were built with classic asp and ado, Unit Testing wasn't much on developers minds.

But, in 2009, I'm amazed by the lack of unit testing in most environments I've encountered...

In fact, most environments (not all, but most) I've seen don't even have a dedicated QA team, or even testers!!!

There are no excuses.

  • Visual Studio (since 2005) have right-click generation of unit test projects and test method stubs.
  • There are plenty of documentation, add ons/tools and frameworks.
  • Most Pattern & Practices (CAB/SCSF, Prism, Asp.Net Mvc, etc.) are greatly oriented towards unit testing.
  • We know now that the teams that include unit testing (especially TDD) are far more productive than teams that don't. (less time and better quality)


So, I blame:

  • Superiors/Bosses without a vision
  • Senior architects/developers without a vision or balls to push unit testing
  • Architects that don't show the way, or even block it (yeah, I know)
  • Project Leaders who didn't plan for Unit Testing in the "project plan"
  • Developers/programmers who don't care
  • Clients who accept mediocre applications
  • "The Media" who doesn't care because Unit Testing is not sexy and doesn't bring in the dough
  • A mentality of more "know-at-whatever-quality" instead of more "quality"
  • Demos that become applications
  • Sample Codes and snippets available on the web that hints away from Unit Testing
  • Projects that are either already started without unit testing or that start with a demo ware attitude
  • Microsoft for creating development tools that make it easier to write bad than it is to write good.

Visual Studio should have two template groups:

  1. Simple throw away templates (or templates that we have right now)
  2. Enterprise class templates

In 2) Enterprise templates, it should be impossible to write code that doesn't follow best practices like high availability, security, unit testability (if that word exists), for instance:

  • Tight Coupling should be "deprecated" !
  • The use of Interfaces should be mandatory ?
  • Ho and so much more

Since Visual Studio can throw a warning if a variable is used before it's set, if a variable is just not used, or if not all paths within a function return a value, lets include "hey, this is bad code".

In the next few years, we'll see development environments, frameworks and utilities that will make it easier to do right than it is to do wrong, making this blog obsolete, in the meantime, push the Unit Testing.

Finally,

I blame myself not working hard enough in promoting/evangelizing unit testing with my colleagues..

Mea Culpa

 

Pat Posted on Wednesday, April 1, 2009 8:02 PM | Back to top


Comments on this post: The Current state of Unit Testing in the software industry.

# re: The Current state of Unit Testing in the software industry.
Requesting Gravatar...
Great post man, I couldn't agree more ...

Left by Unit Test Guy on Apr 03, 2009 4:55 AM

# re: The Current state of Unit Testing in the software industry.
Requesting Gravatar...
Quality is very important for any field including the software industry. Although thorough testing can be costly, the generated quality ads value to the final product.
Left by exe file extension on Jan 09, 2011 9:04 PM

Your comment:
 (will show your gravatar)


Copyright © Patrice Calvé | Powered by: GeeksWithBlogs.net