XmlReportWriter writes an XML report whose format is compatible
with the de facto standard for JUnit 4 based test reports that was made
popular by the Ant build system.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| private static class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Pattern | |
| pack-priv static final char | |
| private static final Map | |
| private final XmlReportData |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static boolean | |
| pack-priv static String | |
| private boolean | |
| private XmlReportWriter. | |
| pack-priv void | |
| private void | writeXmlReport(TestIdentifier testIdentifier, Map<TestIdentifier, XmlReportWriter.
|
| CDATA_SPLIT_PATTERN | back to summary |
|---|---|
| private static final Pattern CDATA_SPLIT_PATTERN | |
| ILLEGAL_CHARACTER_REPLACEMENT | back to summary |
|---|---|
| pack-priv static final char ILLEGAL_CHARACTER_REPLACEMENT | |
| REPLACEMENTS_IN_ATTRIBUTE_VALUES | back to summary |
|---|---|
| private static final Map<Character, String> REPLACEMENTS_IN_ATTRIBUTE_VALUES | |
| reportData | back to summary |
|---|---|
| private final XmlReportData reportData | |
| XmlReportWriter | back to summary |
|---|---|
| pack-priv XmlReportWriter(XmlReportData reportData) | |
| isAllowedXmlCharacter | back to summary |
|---|---|
| pack-priv static boolean isAllowedXmlCharacter(int codePoint) | |
| replaceIllegalCharacters | back to summary |
|---|---|
| pack-priv static String replaceIllegalCharacters(String text) | |
| shouldInclude | back to summary |
|---|---|
| private boolean shouldInclude(TestPlan testPlan, TestIdentifier testIdentifier) | |
| toAggregatedResult | back to summary |
|---|---|
| private XmlReportWriter. | |
| writeXmlReport | back to summary |
|---|---|
| pack-priv void writeXmlReport(TestIdentifier rootDescriptor, Writer out) throws XMLStreamException | |
| writeXmlReport | back to summary |
|---|---|
| private void writeXmlReport(TestIdentifier testIdentifier, Map<TestIdentifier, XmlReportWriter. | |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static enum |
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private static final XmlReportWriter. | |
| private final XmlReportWriter. |
| Access | Constructor and Description |
|---|---|
| private | AggregatedTestResult(XmlReportWriter.
|
| Modifier and Type | Method and Description |
|---|---|
| public Map | |
| public static XmlReportWriter. | |
| public static XmlReportWriter. |
| executionResults | back to summary |
|---|---|
| private final List<TestExecutionResult> executionResults | |
| SKIPPED_RESULT | back to summary |
|---|---|
| private static final XmlReportWriter. | |
| type | back to summary |
|---|---|
| private final XmlReportWriter. | |
| AggregatedTestResult | back to summary |
|---|---|
| private AggregatedTestResult(XmlReportWriter. | |
| getThrowablesByType | back to summary |
|---|---|
| public Map | |
| nonSkipped | back to summary |
|---|---|
| public static XmlReportWriter. | |
| skipped | back to summary |
|---|---|
| public static XmlReportWriter. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final XmlReportWriter. | |
| public static final XmlReportWriter. | |
| public static final XmlReportWriter. | |
| public static final XmlReportWriter. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static XmlReportWriter. | |
| private static boolean | |
| public static XmlReportWriter. | |
| public static XmlReportWriter. |
| ERROR | back to summary |
|---|---|
| public static final XmlReportWriter. | |
| FAILURE | back to summary |
|---|---|
| public static final XmlReportWriter. | |
| SKIPPED | back to summary |
|---|---|
| public static final XmlReportWriter. | |
| SUCCESS | back to summary |
|---|---|
| public static final XmlReportWriter. | |
| Type | back to summary |
|---|---|
| private Type() | |
| from | back to summary |
|---|---|
| private static XmlReportWriter. | |
| isFailure | back to summary |
|---|---|
| private static boolean isFailure(TestExecutionResult result) | |
| valueOf | back to summary |
|---|---|
| public static XmlReportWriter. | |
| values | back to summary |
|---|---|
| public static XmlReportWriter. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Writer | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Writer | append(CharSequence csq)
Overrides java. Implements java. Appends the specified character sequence to this writer. |
| public Writer | append(CharSequence csq, int start, int end)
Overrides java. Implements java. Appends a subsequence of the specified character sequence to this writer. |
| public Writer | append(char c)
Overrides java. Implements java. Appends the specified character to this writer. |
| public void | close()
Implements abstract java. Implements java. Closes the stream, flushing it first. |
| public void | flush()
Implements abstract java. Implements java. Flushes the stream. |
| pack-priv void | |
| public void | write(char[] cbuf, int off, int len)
Implements abstract java. Writes a portion of an array of characters. |
| public void | |
| public void | |
| public void | |
| public void |
| delegate | back to summary |
|---|---|
| private final Writer delegate | |
| whitespaceReplacingEnabled | back to summary |
|---|---|
| private boolean whitespaceReplacingEnabled | |
| ReplacingWriter | back to summary |
|---|---|
| pack-priv ReplacingWriter(Writer delegate) | |
| append | back to summary |
|---|---|
| public Writer append(CharSequence csq) throws IOException Overrides java. Implements java. Doc from java. Appends the specified character sequence to this writer. An invocation of this method of the form out.write(csq.toString()) Depending on the specification of
| |
| append | back to summary |
|---|---|
| public Writer append(CharSequence csq, int start, int end) throws IOException Overrides java. Implements java. Doc from java. Appends a subsequence of the specified character sequence to this writer. An invocation of this method of the form
out.write(csq.subSequence(start, end).toString())
| |
| append | back to summary |
|---|---|
| public Writer append(char c) throws IOException Overrides java. Implements java. Doc from java. Appends the specified character to this writer. An invocation of this method of the form out.write(c)
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract java. Implements java. Doc from java. Closes the stream, flushing it first. Once the stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously closed stream has no effect.
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Implements abstract java. Implements java. Doc from java. Flushes the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams. If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.
| |
| setWhitespaceReplacingEnabled | back to summary |
|---|---|
| pack-priv void setWhitespaceReplacingEnabled(boolean whitespaceReplacingEnabled) | |
| write | back to summary |
|---|---|
| public void write(char[] cbuf, int off, int len) throws IOException Implements abstract java. Doc from java. Writes a portion of an array of characters.
| |
| write | back to summary |
|---|---|
| public void write(int c) throws IOException Overrides java. Doc from java. Writes a single character. The character to be written is contained in the 16 low-order bits of the given integer value; the 16 high-order bits are ignored. Subclasses that intend to support efficient single-character output should override this method.
| |
| write | back to summary |
|---|---|
| public void write(char[] cbuf) throws IOException Overrides java. Doc from java. Writes an array of characters.
| |
| write | back to summary |
|---|---|
| public void write(String str) throws IOException Overrides java. Doc from java. Writes a string.
| |
| write | back to summary |
|---|---|
| public void write(String str, int off, int len) throws IOException Overrides java. Doc from java. Writes a portion of a string.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final XmlReportWriter. | |
| private final XMLStreamWriter |
| Modifier and Type | Method and Description |
|---|---|
| private void | buildReportEntryDescription(LocalDateTime timestamp, Map<String, String> keyValuePairs, int entryNumber, StringBuilder result)
|
| public void | close()
Implements java. Closes this resource, relinquishing any underlying resources. |
| private void | collectReportEntries(TestIdentifier testIdentifier, List<String> systemOutElements, List<String> systemErrElements)
|
| private String | |
| private String | |
| private LocalDateTime | |
| private Optional | |
| private String | |
| private String | |
| private void | |
| private void | |
| pack-priv void | write(TestIdentifier testIdentifier, Map<TestIdentifier, XmlReportWriter.
|
| private void | |
| private void | |
| private void | writeErrorOrFailureElement(XmlReportWriter.
|
| private void | |
| private void | |
| private void | |
| private void | |
| private void | writeSkippedOrErrorOrFailureElement(TestIdentifier testIdentifier, XmlReportWriter.
|
| private void | writeSuiteAttributes(TestIdentifier testIdentifier, Collection<XmlReportWriter.
|
| private void | |
| private void | writeTestcase(TestIdentifier testIdentifier, XmlReportWriter.
|
| private void | |
| private void | writeTestsuite(TestIdentifier testIdentifier, Map<TestIdentifier, XmlReportWriter.
|
| out | back to summary |
|---|---|
| private final XmlReportWriter. | |
| xml | back to summary |
|---|---|
| private final XMLStreamWriter xml | |
| XmlReport | back to summary |
|---|---|
| pack-priv XmlReport(Writer out) throws XMLStreamException | |
| buildReportEntryDescription | back to summary |
|---|---|
| private void buildReportEntryDescription(LocalDateTime timestamp, Map<String, String> keyValuePairs, int entryNumber, StringBuilder result) | |
| close | back to summary |
|---|---|
| public void close() throws XMLStreamException Implements java. Doc from java. Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
| |
| collectReportEntries | back to summary |
|---|---|
| private void collectReportEntries(TestIdentifier testIdentifier, List<String> systemOutElements, List<String> systemErrElements) | |
| formatNonStandardAttributesAsString | back to summary |
|---|---|
| private String formatNonStandardAttributesAsString(TestIdentifier testIdentifier) | |
| getClassName | back to summary |
|---|---|
| private String getClassName(TestIdentifier testIdentifier) | |
| getCurrentDateTime | back to summary |
|---|---|
| private LocalDateTime getCurrentDateTime() | |
| getHostname | back to summary |
|---|---|
| private Optional | |
| getName | back to summary |
|---|---|
| private String getName(TestIdentifier testIdentifier) | |
| getTime | back to summary |
|---|---|
| private String getTime(TestIdentifier testIdentifier, NumberFormat numberFormat) | |
| newLine | back to summary |
|---|---|
| private void newLine() throws XMLStreamException | |
| removeIfPresentAndAddAsSeparateElement | back to summary |
|---|---|
| private void removeIfPresentAndAddAsSeparateElement(Map<String, String> keyValuePairs, String key, List<String> elements) | |
| write | back to summary |
|---|---|
| pack-priv void write(TestIdentifier testIdentifier, Map<TestIdentifier, XmlReportWriter. | |
| writeAttributeSafely | back to summary |
|---|---|
| private void writeAttributeSafely(String name, String value) throws XMLStreamException | |
| writeCDataSafely | back to summary |
|---|---|
| private void writeCDataSafely(String data) throws XMLStreamException | |
| writeErrorOrFailureElement | back to summary |
|---|---|
| private void writeErrorOrFailureElement(XmlReportWriter. | |
| writeFailureAttributesAndContent | back to summary |
|---|---|
| private void writeFailureAttributesAndContent(Throwable throwable) throws XMLStreamException | |
| writeOutputElement | back to summary |
|---|---|
| private void writeOutputElement(String elementName, String content) throws XMLStreamException | |
| writeOutputElements | back to summary |
|---|---|
| private void writeOutputElements(String elementName, List<String> elements) throws XMLStreamException | |
| writeSkippedElement | back to summary |
|---|---|
| private void writeSkippedElement(@Nullable String reason, XMLStreamWriter writer) throws XMLStreamException | |
| writeSkippedOrErrorOrFailureElement | back to summary |
|---|---|
| private void writeSkippedOrErrorOrFailureElement(TestIdentifier testIdentifier, XmlReportWriter. | |
| writeSuiteAttributes | back to summary |
|---|---|
| private void writeSuiteAttributes(TestIdentifier testIdentifier, Collection<XmlReportWriter. | |
| writeSystemProperties | back to summary |
|---|---|
| private void writeSystemProperties() throws XMLStreamException | |
| writeTestcase | back to summary |
|---|---|
| private void writeTestcase(TestIdentifier testIdentifier, XmlReportWriter. | |
| writeTestCounts | back to summary |
|---|---|
| private void writeTestCounts(Collection<XmlReportWriter. | |
| writeTestsuite | back to summary |
|---|---|
| private void writeTestsuite(TestIdentifier testIdentifier, Map<TestIdentifier, XmlReportWriter. | |