You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Lukas Theussl (JIRA)" <ji...@codehaus.org> on 2006/03/22 23:59:11 UTC

[jira] Closed: (MPTEST-35) Test plugin (actually the ant task) generates 1 testresult for multi class suite

     [ http://jira.codehaus.org/browse/MPTEST-35?page=all ]
     
Lukas Theussl closed MPTEST-35:
-------------------------------

     Assign To: Lukas Theussl  (was: Jason van Zyl)
    Resolution: Fixed

Fixed in m1.1 which comes with ant 1.6.5

> Test plugin (actually the ant task) generates 1 testresult for multi class suite
> --------------------------------------------------------------------------------
>
>          Key: MPTEST-35
>          URL: http://jira.codehaus.org/browse/MPTEST-35
>      Project: maven-test-plugin
>         Type: Bug

>     Reporter: Martijn Dashorst
>     Assignee: Lukas Theussl

>
>
> From the changelog of the ant junit-task (XMLJUnitResultFormatter, revision 1.30):
> --- begin quote ---
> A JUnit TestSuite can contain tests from multiple classes.  In particular it can contain tests from two different classes but with the same method name.
> Add a new classname attribute to the <testcase> element in the XML report so that people know which test the report is talking about.
> --- end quote ---
> For instance:
> public class AllTests extends junit.framework.TestCase {
> public static junit.framework.Test suite() {
>     junit.framework.TestSuite suite = new junit.framework.TestSuite();
>     suite.addTestSuite(FooTest.class);
>     suite.addTestSuite(BarTest.class);
>     return suite;
> }
> }
> public class FooTest extends junit.framework.TestCase {
>     public void testFooBar() {
>         fail();
>     }
> }
> public class BarTest extends junit.framework.TestCase {
>     public void testFooBar() {
>         fail();
>     }
> }
> When excuting the AllTests suite, all test results come in one file, without knowing which test had failed (both methods have the same name).
> The junit task of ant 1.6.1 has solved this problem by generating the classname in the xml element of the testreport.

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