October 23, 2007
JUnit: Happy Birthday

In the my-how-time-flies category, I almost missed the 10th birthday of JUnit, the unit testing framework for Java that Kent Beck and Erich Gamma created. To the best of my recollection, Dr. Dobb's first in-depth examination of JUnit was in Siegfried Goeschl's The JUnit++ Testing Tool article, which presented a variation of the JUnit.
But tweaking JUnit like Siegfried did isn't unusual. In fact, the JUnit framework has been ported to languages other than Java, including: C++, CPPUnit; PHP, PHPUnit; C#, Nunit; Fortran, fUnit; and Perl, Test::Class and Test::Unit, among others. Ah, the beauty of open source.
According to a recent survey conducted by Evans Data for Agitar Software, unit testing is a growing practice, thanks in large part to JUnit I'd bet. The study revealed that nearly three quarters of Java developers worldwide use JUnit and the framework has been downloaded more than 2 million times, and included as a plug-in in all major IDEs. Among other things, the survey found that 87 percent of Java developers are using unit-testing tools and 71 percent using JUnit. It also revealed that: only 19 percent of Java developers have adopted unit testing automation tools; that Java users most likely to use testing tools are in financial services, telecommunications, retail, manufacturing, and IT consulting; and that unit testing is used most often in North America and least in EMEA. It's also used proportionately more in enterprises with more than 1,000 employees.
Moreover, Agitar recently announced that its JUnit Factory, its free, web-based, unit-test generation service, has generated more than 1 million JUnit tests since it was launched in January of this year.
"The adoption of JUnit has far exceeded my early expectations," says Kent Beck. Well, what do you expect Kent? That's what happens when you create a quality tool that serves a real need.
-- Jonathan Erickson
jerickson@ddj.com
Posted by Jon Erickson at 09:56 AM Permalink
|