On Oct 27, 2006, at 4:20 AM, Robert Greig wrote:
On 27/10/06, John O'Hara <[EMAIL PROTECTED]> wrote:
What's in 4 that merits the major feature number?
I'd like to know what we're throwing away.

Junit 4 does not represent a quantum leap in functionality. It uses
annotations like TestNG which is perhaps a bit more flexible
(particularly if people start writing their own) and has some features
that looked useful to me like parametrizable test cases.

Right. With the annotations, for example, you can call your setUp() method whatever you want and just annotate it with @Before. Similarly, you can call your test methods whatever you want, rather than requiring them all to start with "test", and annotate them with @Test instead. The @Test annotation can also specify expected exceptions. But like you say, Robert, these don't represent a quantum leap in functionality.

It does come with an adapter to allow bridging to tools that are not
"Junit 4 aware", which we used successfully with ant and Intellij 5
(Intellij 6 now supports Junit 4 fully).

Steve, why does the bridge approach (which I believe we added to all
the test cases, e.g.:

public static junit.framework.Test suite()
{
   return new JUnit4TestAdapter(AckTest.class);
}

not work with Maven?

If it did, I wouldn't have been tearing my hair out over this effort for the past couple weeks. :-) Basically, even with the suite() methods in place, maven believes that there are no tests to run.

I believe bug report [1] captures why the suite() approach doesn't work. My guess is that several of bugs like these combine, with the result being that the combination of maven and junit4 is simply a non- starter.

--steve

[1] <http://jira.codehaus.org/browse/MSUREFIRE-131>

Reply via email to