maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Rimov (JIRA)" <j...@codehaus.org>
Subject [jira] Updated: (MSUREFIRE-131) Surefire-JUnit does not recognize "suite"-methods
Date Tue, 03 Oct 2006 08:22:28 GMT
     [ http://jira.codehaus.org/browse/MSUREFIRE-131?page=all ]

Michael Rimov updated MSUREFIRE-131:
------------------------------------

    Attachment: surefire-test.zip

I was going to open a new bug, but found this that I believe is the same bug -- here is a
simple test case that shows that the suite method isn't properly executed.

mvn test will won't execute any tests with this project.

> Surefire-JUnit does not recognize "suite"-methods
> -------------------------------------------------
>
>                 Key: MSUREFIRE-131
>                 URL: http://jira.codehaus.org/browse/MSUREFIRE-131
>             Project: Maven 2.x Surefire Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2
>            Reporter: Philip Gerlach
>             Fix For: 2.3
>
>         Attachments: commons-events-pom.xml, maven-surefire-junit-trunk-412516.patch,
surefire-test.zip
>
>
> Since Surefire-JUnit doesn't support JUnit4 yet, i tried to use a "suite"-method like
> ------
> public static junit.framework.Test suite() {
>    return new junit.framework.JUnit4TestAdapter(Foo.class);
> }
> -----
> to run it, but Surefire-JUnit did not recognize these methods and treated them like PojoTests
what obviously lead to TestFailures.
> So I fetched the source code from the repository and searched for the problem. I found
two if-conditons in JUnitTestSet and JUnitDirectoryTestSuite that did not test for the "suite"-mechanism,
so I wrote a new static method to test for this situation and integrated it in the if-conditions.
> Now the "suite"-methods work for my JUnit4 Tests and should do also for others ;-)
> The patch is attached.
> P.S. Since this it is the first time, I'm trying to bugfix something for an open source-project,
please just let me know, if I have done something wrong with this process.

-- 
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

        

Mime
View raw message