Class XmlReportWriter
java.lang.Object
com.arc_e_tect.gradle.jacoco.report.XmlReportWriter
Writes a Surefire-compatible XML report so CI tools (Jenkins, GitLab, GitHub
Actions test-reporter) can display exclusions alongside normal test results.
Each excluded element becomes one <testcase> with time="0".
The suite never has failures — its purpose is documentation, not assertion.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(List<ExcludedElement> elements, String annotationName, File outputDir) Writes a Surefire-compatible XML report tojacoco-exclusions.xmlinsideoutputDir.
-
Constructor Details
-
XmlReportWriter
public XmlReportWriter()Creates a newXmlReportWriter.
-
-
Method Details
-
write
public void write(List<ExcludedElement> elements, String annotationName, File outputDir) throws IOException Writes a Surefire-compatible XML report tojacoco-exclusions.xmlinsideoutputDir.- Parameters:
elements- the excluded elements to reportannotationName- the annotation name embedded in the XML commentoutputDir- target directory; created if it does not exist- Throws:
IOException- if the output file cannot be written
-