Class TapPublisher

All Implemented Interfaces:
ExtensionPoint, hudson.matrix.MatrixAggregatable, Describable<Publisher>, BuildStep, SimpleBuildStep

public class TapPublisher extends Recorder implements hudson.matrix.MatrixAggregatable, SimpleBuildStep
Publishes TAP results in Jenkins builds.
Since:
1.0
  • Constructor Details

  • Method Details

    • readResolve

      public Object readResolve()
      To prevent serialization issues after fields have been added or removed. e.g. https://issues.jenkins.io/browse/JENKINS-72558.
      Returns:
      The instance
    • getShowOnlyFailures

      public Boolean getShowOnlyFailures()
    • getStripSingleParents

      public Boolean getStripSingleParents()
    • getFailIfNoResults

      public Boolean getFailIfNoResults()
      Returns:
      the failIfNoResults
    • getTestResults

      public String getTestResults()
      Returns:
      the testResults
    • getFailedTestsMarkBuildAsFailure

      public Boolean getFailedTestsMarkBuildAsFailure()
    • getOutputTapToConsole

      public Boolean getOutputTapToConsole()
      Returns:
      the outputTapToConsole
    • getEnableSubtests

      public Boolean getEnableSubtests()
      Returns:
      the enableSubtests
    • getDiscardOldReports

      public Boolean getDiscardOldReports()
      Returns:
      the discardOldReports
    • getTodoIsFailure

      public Boolean getTodoIsFailure()
      Returns:
      the todoIsFailure
    • getIncludeCommentDiagnostics

      public Boolean getIncludeCommentDiagnostics()
      Returns:
      the includeCommentDiagnostics
    • getValidateNumberOfTests

      public Boolean getValidateNumberOfTests()
    • getPlanRequired

      public Boolean getPlanRequired()
    • getVerbose

      public Boolean getVerbose()
    • getFlattenTapResult

      public Boolean getFlattenTapResult()
    • getRemoveYamlIfCorrupted

      public Boolean getRemoveYamlIfCorrupted()
    • getSkipIfBuildNotOk

      public Boolean getSkipIfBuildNotOk()
    • getReportsDirectory

      public static FilePath getReportsDirectory(Run<?,?> build)
      Gets the directory where the plug-in saves its TAP streams before processing them and displaying in the UI.

      Adapted from JUnit Attachments Plug-in.

      Parameters:
      build - Jenkins build
      Returns:
      virtual directory (FilePath)
    • getProjectAction

      public Action getProjectAction(AbstractProject<?,?> project)
      Specified by:
      getProjectAction in interface BuildStep
      Overrides:
      getProjectAction in class BuildStepCompatibilityLayer
    • perform

      public void perform(@Nonnull Run<?,?> run, @Nonnull FilePath workspace, @Nonnull Launcher launcher, @Nonnull TaskListener listener) throws InterruptedException, IOException
      Specified by:
      perform in interface SimpleBuildStep
      Throws:
      InterruptedException
      IOException
    • getRequiredMonitorService

      public BuildStepMonitor getRequiredMonitorService()
      Specified by:
      getRequiredMonitorService in interface BuildStep
    • createAggregator

      public hudson.matrix.MatrixAggregator createAggregator(hudson.matrix.MatrixBuild build, Launcher launcher, BuildListener listener)
      Specified by:
      createAggregator in interface hudson.matrix.MatrixAggregatable