In the second page of a recent interview with Erich Gamma by Bill Venners on
How to Use Design Patterns Gamma mentions that work has begun on JUnit 4.0 with Kent Beck.
Interestingly Gamma points out they are using J2SE 1.5 features (annotations), with the goal of simplifying use. Before Cedric comments
, I should point out that TestNG has already got some of these features. While his stuff looks cool, I think that the name and brand-recognition of JUnit will help the adoption of JUnit 4.0, if it ever becomes more than vapourware.
It will be interesting to see how the introduction of new technology will impact day-to-day coding. It is definately still early days yet. For any changes to really hit people, the changes will first need to be made to JUnit, and then IDE integration will need to happen. Having said that, given Erich and Kent’s involvement in Eclipse, there probably won’t be too much lag time in the IDE integration front.
I look forward to seeing what comes of this.
No related posts.










Hi Cedric,
The interview was done at OOPSLA but just published recently and I confess that the JUnit 4 comment got sneaked shortly before publication. However, it is true that Kent and I are doing remote pair programming on JUnit. It is a lot of fun and all done in the open on sourceforge (branch name is Version4). We are open for feedback and Kent and I intend to start blogging on our experiences soon.
Let’s hope they don’t make JUnit4 end up like NUnit: simple to use for the basic functionality, but ridiculously hard to extend because the attributes are the *only* API, not just a convenient way of using the object model of tests and test suites.
The current direction of JUnit 4 is indeed to use annotations for most of the API of JUnit, along with the basic test runner. The API is currently six annotations and an Assert class whose functions are intended to be referenced by static import. Can you tell me some kinds of customization that are difficult with this style of interface?
Kent Beck
Three Rivers Institute
Since you asked…
This interview is already a bit old and yet, no JUnit4 details have transpired whatsoever. I certainly hope that when/if they start working on JUnit4, it will be very public work and users will be invited to provide feedback.
In the code stored into SourceForge CVS there already are some changes involving J2SE 5 features. But the commits appear to be quite old, so maybe the work Gamma and Beck are doing is not quite public nor open to the kind of feedback Cedric hopes for.