Class AntXmlReport
java.lang.Object
com.carrotsearch.ant.tasks.junit4.listeners.antxml.AntXmlReport
- All Implemented Interfaces:
AggregatedEventListener
A report listener that produces XML files compatible with those produced by
ANT's default
junit
task. These files do not include full
information but many tools can parse them.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate File
private List
<org.apache.tools.ant.filters.TokenFilter> private boolean
private JUnit4
private boolean
private boolean
private File
private final TestsSummaryEventListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addConfiguredTokenFilter
(org.apache.tools.ant.filters.TokenFilter filter) Adds method name filter.private String
applyFilters
(String methodName) Apply filters to a method name.private TestSuiteModel
Build data model for serialization.private FailureModel
private List
<TestCaseModel> buildModel
(List<AggregatedTestResultEvent> testEvents) private List
<PropertyModel> buildModel
(Map<String, String> properties) void
Write the summary file, if requested.void
Emit information about all of suite's tests.void
Output directory to write reports to.void
setIgnoreDuplicateSuites
(boolean ignoreDuplicateSuites) Ignore duplicate suite names.void
setMavenExtensions
(boolean mavenExtensions) Emit maven elements in the XML (extensions compared to ANT).void
Link to the container.void
setOutputStreams
(boolean outputStreams) Include output streams? Mind that with large outputs the report may OOM.void
setSummaryFile
(File file) Where to emit Maven's summary file? This can be used by the failsafe plugin to verify whether the build succeeded or not.
-
Field Details
-
junit4
-
dir
-
mavenExtensions
private boolean mavenExtensions -
summaryFile
-
filters
-
suiteCounts
-
ignoreDuplicateSuites
private boolean ignoreDuplicateSuites -
outputStreams
private boolean outputStreams- See Also:
-
summaryListener
-
-
Constructor Details
-
AntXmlReport
public AntXmlReport()
-
-
Method Details
-
setDir
Output directory to write reports to. -
setSummaryFile
Where to emit Maven's summary file? This can be used by the failsafe plugin to verify whether the build succeeded or not. -
setOutputStreams
public void setOutputStreams(boolean outputStreams) Include output streams? Mind that with large outputs the report may OOM. -
setMavenExtensions
public void setMavenExtensions(boolean mavenExtensions) Emit maven elements in the XML (extensions compared to ANT). -
setIgnoreDuplicateSuites
public void setIgnoreDuplicateSuites(boolean ignoreDuplicateSuites) Ignore duplicate suite names. -
addConfiguredTokenFilter
public void addConfiguredTokenFilter(org.apache.tools.ant.filters.TokenFilter filter) Adds method name filter. -
setOuter
Description copied from interface:AggregatedEventListener
Link to the container. Listener can throwBuildException
if parameter validation doesn't succeed, for example.- Specified by:
setOuter
in interfaceAggregatedEventListener
-
onQuit
Write the summary file, if requested. -
onSuiteResult
Emit information about all of suite's tests. -
buildModel
Build data model for serialization.- Throws:
IOException
-
buildModel
-
applyFilters
Apply filters to a method name.- Parameters:
methodName
-
-
buildModel
-
buildModel
-