CHANNELS
HOME
TOP STORIES
COLUMNS
OPINIONS
ZEICHICK'S TAKE
EMBEDDED NEWS
TEST & QA REPORT
ECLIPSESOURCE
SPECIAL REPORTS
SD TIMES 100
JOB BOARD
EVENTS CALENDAR
RESOURCE CENTER
WEBINAR CENTER
ADVANCED SEARCH
RSS
ON THE WEB
SITE MAP
ADVERTISE
EDITORIAL
PRIVACY POLICY
CONTACT US
REPORT A BUG
PRINT EDITION
SUBSCRIBE NOW!
CURRENT ISSUE
BACK ISSUES
SUBSCRIBER SERVICES
BZ MEDIA
ABOUT US
NEWS
BZ RESEARCH
SYSMANNEWS
ST&P MAGAZINE
STPCON
ECLIPSEWORLD
ADVERTISER LINKS
activePDF
Alexsys
Altova
Amyuni Technologies
Automated QA
Axosoft
Business Objects
Codejock Software
ComponentOne
Coverity
Data Dynamics
Developer Express
dtSearch
Dundas
Dynamsoft
Hewlett-Packard
IBM
Imagix
Infragistics
InstallAware Software
InterSystems
iWay
Kovair
LEAD Technologies
McObject
Microsoft
MKS
No Magic
nsoftware
Parasoft
Pegasus Imaging Corp
Perforce
Prezza Technologies
Programmer's Paradise
Programming Research
Rally Software Dev
Red Gate Software
ScaleOut
Seapine
Serena
Software FX
Sparx Systems
Swell Software
Syncfusion
TechExcel
Telerik
UrbanCode
WANdisco
Xceed Software
LOADING...
LOADING...
AS OF 8/7/2008 4:28PM EST
Happy 10th Birthday, JUnit
By
Edward J. Correia
October 9, 2007 —
If youre part of a team building applications with Java, chances are good that youre using JUnit for testing.
How good? According to a recent survey released last week by Evans Data, more than seven in 10 use the open-source unit-testing framework first offered by Kent Beck and Erich Gamma in 1997. Overall, 87 percent of Java developers are using a unit-testing tool of some kind.
And I think thats a good thing for testers. Because the more responsibility developers take for building working code, the less bug hunting youll have to do, enabling you to focus on the more important aspects of your job, such as functional and requirements testing and QA.
In the last decade, JUnit has been downloaded more than 2 million times, according to Evans, and is included as a plugin to all major IDEs, including Eclipse. The tool is particularly prevalent in financial services, telecom, retail, manufacturing and IT consulting industries in North America, where an estimated 1.2 million developers use Java. Java usage is even greater in Europe, the Middle East and Africa (EMEA), but unit testing is done less often there and the Asia/Pacific (APAC) area.
And those using JUnit are apparently quite happy with it. Of the 558 responding Java users, nearly two-thirds (63.7 percent) are either extremely or somewhat satisfied with their unit-testing tool. Only 5.2 percent were unsatisfied, and 18.5 percent were somewhat unsatisfied. The remaining respondents said they dont use unit-testing tools.
There are versions of the unit-testing framework for numerous languages other than Java, including C# (
NUnit
), C++ (
CPPUnit
), Fortran (
fUnit
), Perl (
Test::Class
and
Test::Unit
), PHP (
PHPUnit
), Python (
PyUnit
). Theres even a version for JavaScript (
JSUnit
). JUnits own site is
junit.sourceforge.net
.
But even with its wide adoption, which Beck says has far exceeded his original expectations, far too much programming is done without the benefit of tests. For decades, programmers have ceded responsibility for quality to someone else, says Beck. Programmers need to turn this around and insist that their code work before asking anyone else to invest time in it. Theres also a need for better design skills, which he says will lead to better tests. To get better tests, you need more skilled programmers making good large- and small-scale design decisions. The tools could still be even simpler and provide higher value. That was the goal behind the latest release of JUnit 4.4.
Features in 4.4, say the
release notes
, are designed to efficiently capture developers intentions about their code and quickly check [that] their code matches those intentions. This is accomplished through a
new assertion syntax
built by Joe Walnes atop what was the
JMock 1
library for test-driven Java development.
A new API is built into JUnit 4.4 with an extensible and readable syntax, enabling new features like
assumptions
, which permits the declaration of explicit dependencies when a tester has no control of forces that might cause a test to fail. Assumptions also give rise to
theories
, which can capture some aspect of behavior in possibly infinite numbers of potential scenarios, according to the notes.
There are numerous other changes, enhancements and bug fixes in the July release of version 4.4. Download it from the
JUnit download page
.
EMAIL THIS ARTICLE
SEND FEEDBACK
MORE TEST & QA
 
SUBSCRIBE TODAY!
E-Newsletters:
News on Mon/Thurs.
Test & QA Report
EclipseSource
SUBMIT
 
JOB BOARD
PDF & PRINT EDITION
* Requires Resource Account! 
LOGIN
or
SIGN UP
*
Download Current Issue!
ISSUE 8/1/2008 PDF
*
Need Back Issues?
DOWNLOAD HERE
Receive The Print Edition?
SUBSCRIBE HERE
 
EVENTS CALENDAR
SHARE 2008
8/10/2008 to 8/15/2008
San Jose
SHARE
ACM SIGGRAPH
8/11/2008 to 8/15/2008
Los Angeles
ACM SIGGRAPH
Intel Developer Forum
8/19/2008 to 8/21/2008
San Francisco
Intel
Business of Software 2008
9/3/2008 to 9/4/2008
Boston
Red Gate Software
VSLive New York
9/7/2008 to 9/10/2008
New York City
1105 Media
REGISTER
MORE EVENTS
GET NOTIFIED!
About all of the latest Resources
SD TIMES 100
6th Annual SD Times 100
It's time once again to
recognize the organizations
or individuals that have
demonstrated leadership in
their markets.