[ http://jira.codehaus.org/browse/SUREFIRE-31?page=comments#action_76836 ] 
            
Karl M. Davis commented on SUREFIRE-31:
---------------------------------------

Oh, I should also mention that you will not be able to run both JUnit3 and 
JUnit4 tests alongside each other with this patch.  Two things would need to be 
done to make that happen:
 - First, split the surefire-junit provider into "surefire-junit3" and 
"surefire-junit4" providers with separate projects, POMs, and 
(most-importantly) dependencies.
 - Then, further work would need to be done to maven-surefire-plugin.  The 
problem right now is that it can only detect ONE version of JUnit at a time, so 
if both JUnit3 and JUnit4 are present as dependencies, one will end up 
"blocking" the other.  I'm not familiar enough with Maven's project/dependency 
API right now to fix that.

If one of the regular committers took care of those two things, I think my 
patches could be included in the next version.  In the meantime, they're a 
better solution for JUnit4 testing with Maven2 than the separate plugin at 
http://www.unto.net/wiki/Maven_JUnit4_plugin because the results get included 
in the normal test phase reports.

> support junit 4.0
> -----------------
>
>                 Key: SUREFIRE-31
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-31
>             Project: surefire
>          Issue Type: Improvement
>          Components: Junit 4.x support
>            Reporter: John Didion
>             Fix For: 2.1
>
>         Attachments: SUREFIRE-31-maven-surefire-plugin.patch, 
> SUREFIRE-31-surefire-trunk.patch, surefire-junit4.zip, 
> SUREFIRE31_karl_maven-surefire-plugin.patch, 
> SUREFIRE31_karl_surefire_surefire-providers_surefire-junit.patch
>
>
> I know this is a pretty sizable task. I just wanted to get it in the system 
> now that 4.0 has officially been released. Hopefully this will generate some 
> discussion about how 4.0 will be handled - mainly if it will require a 
> completely seperate implemenation of surefire (keeping the same API so it can 
> easily be used by the maven plugin), or if use of 4.0 will be made a 
> configurable option of the current surefire.
> Here's some additional features I'd like to see:
> 1. Ability to categorize tests. Unfortunately, 4.0 doesn't include an 
> @Category annotation, or make category a parameter of @Test. However, the 
> filtering mechanism provided by 4.0 is sufficent to support categories given 
> the presense of such an annotation. I recommend putting the @Category 
> annotation in a seperate module (surefire-annotations?) and build support for 
> it into surefire. Hopefully the junit guys could be convinced to incorporate 
> it in a later version.
> 2. Similarly, support repeated tests via an @Repeated annotation. I'm not 
> sure how easy this would be to do external to junit.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to