Class XmlReportWriter

java.lang.Object
com.arc_e_tect.gradle.jacoco.report.XmlReportWriter

public class XmlReportWriter extends Object
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 Details

    • XmlReportWriter

      public XmlReportWriter()
      Creates a new XmlReportWriter.
  • Method Details

    • write

      public void write(List<ExcludedElement> elements, String annotationName, File outputDir) throws IOException
      Writes a Surefire-compatible XML report to jacoco-exclusions.xml inside outputDir.
      Parameters:
      elements - the excluded elements to report
      annotationName - the annotation name embedded in the XML comment
      outputDir - target directory; created if it does not exist
      Throws:
      IOException - if the output file cannot be written