Class SurefireXmlWriter

java.lang.Object
org.fhirfrog.frog.ant.report.SurefireXmlWriter

public class SurefireXmlWriter extends Object
Writes Surefire-format JUnit XML from a JUnitExecutor.ExecutionResult.

Produces one TEST-<name>.xml file per invocation, compatible with the Ant <junitreport> task and standard CI test result consumers.

Format:


 <testsuite name="..." tests="N" failures="F" errors="0" time="0">
   <testcase name="..." classname="..." time="0"/>
   <testcase name="..." classname="..." time="0">
     <failure message="...">stacktrace</failure>
   </testcase>
 </testsuite>
 
  • Constructor Details

    • SurefireXmlWriter

      public SurefireXmlWriter()
  • Method Details

    • write

      public void write(JUnitExecutor.ExecutionResult result, String suiteName, Path outputDir) throws IOException
      Writes a Surefire XML report file to the given directory.
      Parameters:
      result - the test execution result
      suiteName - name for the test suite (typically the test file name)
      outputDir - directory to write the XML file into (created if absent)
      Throws:
      IOException - if the file cannot be written