Mobile // Mobile Applications
Commentary
9/20/2008
00:00 AM
Commentary
Commentary
Commentary
Connect Directly
RSS
E-Mail
50%
50%

What's Up with Unit Testing? Part I

Back in May, Andrew Binstock wondered "is the popularity of unit tests waning?" Andrew lists 5 indications he observed to support his conclusion:- Commercial tools are waning- Few OSS products- Unit testing is not taught by major Java instructors- Few books get published on unit testing- xUnit alternatives are completely invisible.

Back in May, Andrew Binstock wondered "is the popularity of unit tests waning?" Andrew lists 5 indications he observed to support his conclusion:

  1. Commercial tools are waning
  2. Few OSS products
  3. Unit testing is not taught by major Java instructors
  4. Few books get published on unit testing
  5. xUnit alternatives are completely invisible.

I am not sure I agree with all these observations. Nevertheless in a followup article in Java World, Andrew continued to ask "Is unit testing doomed?".

Andrew says that two issues with unit testing are that they seem to offer little value and that the evangelism of unit testing in general and TDD in particular also causes antagonism (I can say from personal experience with introducing unit testing to long time C and C++ developers that, indeed, the initial responses are rather cold).

Andrew also quotes former CEO of Agitar (Jerry Rudisin) saying that "unit testing hasn't taken off as mainstream practice".  A survey ran by Scott Ambler for Dr. Dobb's also found that "The more difficult practices, such as TDD and executable specification have lower addoption rates than easier practices such as daily scrum meeting. "

(Although another survey by VisionOne found that within companies where agile practices are used 77% use unit testing and about 49% use TDD.)

I recently read another interesting post on the subject, this time by Dan North about the "end of endotesting" explaining why the record-reply idiom of most mocking framework is not intuitive and more easy to use mocking frameworks like mockito (his example) or Moq and Mocha (my examples) are better.

Now, yesterday I read Roy Osherov's post "Goodbye mocks, Farewall stubs". Roy makes similar observation on the adoption (or lack therof ) of unit testing practices. Roy believes the number one reason holding back unit testing is the learning curve associated with it and suggests we simplify the tools and terminology (and gives a example similar to Dan's mentioned above)

What we see is that both in the Java and the .NET worlds, unit tests adoption have hit a few snags. The way I see it there are event  additional barriers to wide adoption of unit test and TDD,  but I'll talk about that in Part II where I'll also try to talk a little about what can/should  be done.

 

 

Comment  | 
Print  | 
More Insights
Building A Mobile Business Mindset
Building A Mobile Business Mindset
Among 688 respondents, 46% have deployed mobile apps, with an additional 24% planning to in the next year. Soon all apps will look like mobile apps and it's past time for those with no plans to get cracking.
Register for InformationWeek Newsletters
White Papers
Current Issue
InformationWeek Tech Digest - July 22, 2014
Sophisticated attacks demand real-time risk management and continuous monitoring. Here's how federal agencies are meeting that challenge.
Flash Poll
Video
Slideshows
Twitter Feed
InformationWeek Radio
Live Streaming Video
Everything You've Been Told About Mobility Is Wrong
Attend this video symposium with Sean Wisdom, Global Director of Mobility Solutions, and learn about how you can harness powerful new products to mobilize your business potential.