Class XUnitReportProcessorService

java.lang.Object
org.jenkinsci.plugins.xunit.service.XUnitReportProcessorService
All Implemented Interfaces:
Serializable

public class XUnitReportProcessorService extends Object implements Serializable
See Also:
  • Constructor Details

    • XUnitReportProcessorService

      @Inject public XUnitReportProcessorService(XUnitLog xUnitLog)
  • Method Details

    • isEmptyPattern

      public boolean isEmptyPattern(String pattern)
      Tests if the pattern is empty.
      Parameters:
      pattern - the given pattern of the current test tool
      Returns:
      true if empty or blank, false otherwise
    • findReports

      public String[] findReports(File parentPath, XUnitToolInfo options) throws NoTestFoundException
      Gets all reports from the given parent path and the pattern.
      Parameters:
      parentPath - folder from where start search
      options - all XUnit options also advanced
      Returns:
      an array of strings
      Throws:
      NoTestFoundException - when not report files were founded
    • checkIfFindsFilesNewFiles

      public void checkIfFindsFilesNewFiles(XUnitToolInfo xUnitToolInfo, String[] resultFiles, File workspace) throws NoNewTestReportException
      Checks if all the finds files are new file.
      Parameters:
      xUnitToolInfo - the wrapped object
      resultFiles - the file list
      workspace - the root location of the file list
      Throws:
      NoNewTestReportException - when the report file is not updated during this build is setup to fail
    • getCurrentReport

      public File getCurrentReport(File root, String name)
      Gets a file from a root file and a name
      Parameters:
      root - the root path
      name - the filename
      Returns:
      the current file
    • isStopProcessingIfError

      public boolean isStopProcessingIfError(XUnitToolInfo xUnitToolInfo)
      Check if we stop the processing for an error
      Parameters:
      xUnitToolInfo - the wrapped object
      Returns:
      true if the xUnit must stop at the first error