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 Fileprivate List<org.apache.tools.ant.filters.TokenFilter> private booleanprivate JUnit4private booleanprivate booleanprivate Fileprivate final TestsSummaryEventListener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConfiguredTokenFilter(org.apache.tools.ant.filters.TokenFilter filter) Adds method name filter.private StringapplyFilters(String methodName) Apply filters to a method name.private TestSuiteModelBuild data model for serialization.private FailureModelprivate List<TestCaseModel> buildModel(List<AggregatedTestResultEvent> testEvents) private List<PropertyModel> buildModel(Map<String, String> properties) voidWrite the summary file, if requested.voidEmit information about all of suite's tests.voidOutput directory to write reports to.voidsetIgnoreDuplicateSuites(boolean ignoreDuplicateSuites) Ignore duplicate suite names.voidsetMavenExtensions(boolean mavenExtensions) Emit maven elements in the XML (extensions compared to ANT).voidLink to the container.voidsetOutputStreams(boolean outputStreams) Include output streams? Mind that with large outputs the report may OOM.voidsetSummaryFile(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:AggregatedEventListenerLink to the container. Listener can throwBuildExceptionif parameter validation doesn't succeed, for example.- Specified by:
setOuterin 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
-
buildModel
-
buildModel
-