https://issues.apache.org/bugzilla/show_bug.cgi?id=56305
Bug ID: 56305
Summary: AntUnitSuite using AntUnitTestCase as class name in
XML reports instead of actual classname
Product: Ant
Version: 1.9.3
Hardware: Macintosh
Status: NEW
Severity: normal
Priority: P2
Component: AntUnit
Assignee: [email protected]
Reporter: [email protected]
When I use the AntUnitSuite in conjunction with the <junit> task in an ant
build the resulting report XML uses "AntUnitTestCase" instead of the custom
class name
where the AntUnitSuite is run from. Below is an example of a test I ran. This
causes parsers like Jenkins junit report to report incorrect packages outside
the scope of the project being tested.
Input Java code:
package com.example.ant;
@RunWith(AntUnitSuiteRunner.class)
public class ExampleTaskTest {
public static TestSuite suite() throws URISyntaxException {
URL resource =
ExampleTaskTest.class.getResource("/com/example/ant/ExampleTaskTest.xml");
File file = new File(resource.toURI());
return new AntUnitSuite(file, ExampleTaskTest.class);
}
}
Actual result:
<testcase classname="org.apache.ant.antunit.junit3.AntUnitTestCase"
name="testMissingDestDir
[/Users/foo/dev/project/example/build/testresources/com/example/ant/ExampleTaskTest.xml
]" time="0.437" />
Desired result:
<testcase classname="com.example.ant.ExampleTaskTest" name="testMissingDestDir
[/Users/foo/dev/project/example/build/testresources/com/example/ant/ExampleTaskTest.xml
]" time="0.437" />
I also ran this test against the Maven Surefire plugin and it did give me the
desired result.
--
You are receiving this mail because:
You are the assignee for the bug.