cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Move to JUnit 4?
Date Fri, 02 Mar 2007 17:15:10 GMT

With the move to Surefire 2.3, we can finally use JUnit 4 if we want to.   
I've done a small amount of investigation to see what would be needed.   
MOST of our unit tests will run unmodified with JUnit 4 and would not need 
to be updated.    The tests that don't run are the ones that require a 
pre-class setup (use a "suite" method).    Those would need to be updated.   
They are pretty simple to update.   The "suite" method is changed to be 
something like:

public static void startservers() {
public static void stopservers() {
and all the test methods need a @Test annotation.

The tests that would need modification include:
1) JMS tests (startup broker)
2) One of the WS Policy tests (just simple setup/teardown)
3) A BUNCH of the System tests.

A couple hours of work would do it.   However, what are peoples thoughts on 
moving to JUnit 4?

The main thing I like about it is to disable a test, you can add an @Ignore 
annotation.    This then shows up when you run "mvn test" as a skipped 
test.   It's much easier to find disabled tests so you know where they are 
to fix them later.

J. Daniel Kulp
Principal Engineer
P: 781-902-8727    C: 508-380-7194

View raw message