Package org.tap4j.plugin
Class TapPublisher
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Publisher
hudson.tasks.Recorder
org.tap4j.plugin.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
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImpl
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory
-
Field Summary
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
Constructor Summary
ConstructorsConstructorDescriptionTapPublisher
(String testResults, Boolean failIfNoResults, Boolean failedTestsMarkBuildAsFailure, Boolean outputTapToConsole, Boolean enableSubtests, Boolean discardOldReports, Boolean todoIsFailure, Boolean includeCommentDiagnostics, Boolean validateNumberOfTests, Boolean planRequired, Boolean verbose, Boolean showOnlyFailures, Boolean stripSingleParents, Boolean flattenTapResult, Boolean removeYamlIfCorrupted, Boolean skipIfBuildNotOk) -
Method Summary
Modifier and TypeMethodDescriptionhudson.matrix.MatrixAggregator
createAggregator
(hudson.matrix.MatrixBuild build, Launcher launcher, BuildListener listener) getProjectAction
(AbstractProject<?, ?> project) static FilePath
getReportsDirectory
(Run<?, ?> build) Gets the directory where the plug-in saves its TAP streams before processing them and displaying in the UI.void
perform
(Run<?, ?> run, FilePath workspace, Launcher launcher, TaskListener listener) To prevent serialization issues after fields have been added or removed.Methods inherited from class hudson.tasks.Recorder
getDescriptor
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectActions, perform, perform, prebuild
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.tasks.BuildStep
getProjectActions, perform, prebuild
Methods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
Constructor Details
-
TapPublisher
@DataBoundConstructor public TapPublisher(String testResults, Boolean failIfNoResults, Boolean failedTestsMarkBuildAsFailure, Boolean outputTapToConsole, Boolean enableSubtests, Boolean discardOldReports, Boolean todoIsFailure, Boolean includeCommentDiagnostics, Boolean validateNumberOfTests, Boolean planRequired, Boolean verbose, Boolean showOnlyFailures, Boolean stripSingleParents, Boolean flattenTapResult, Boolean removeYamlIfCorrupted, Boolean skipIfBuildNotOk)
-
-
Method Details
-
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
-
getStripSingleParents
-
getFailIfNoResults
- Returns:
- the failIfNoResults
-
getTestResults
- Returns:
- the testResults
-
getFailedTestsMarkBuildAsFailure
-
getOutputTapToConsole
- Returns:
- the outputTapToConsole
-
getEnableSubtests
- Returns:
- the enableSubtests
-
getDiscardOldReports
- Returns:
- the discardOldReports
-
getTodoIsFailure
- Returns:
- the todoIsFailure
-
getIncludeCommentDiagnostics
- Returns:
- the includeCommentDiagnostics
-
getValidateNumberOfTests
-
getPlanRequired
-
getVerbose
-
getFlattenTapResult
-
getRemoveYamlIfCorrupted
-
getSkipIfBuildNotOk
-
getReportsDirectory
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
- Specified by:
getProjectAction
in interfaceBuildStep
- Overrides:
getProjectAction
in classBuildStepCompatibilityLayer
-
perform
public void perform(@Nonnull Run<?, ?> run, @Nonnull FilePath workspace, @Nonnull Launcher launcher, @Nonnull TaskListener listener) throws InterruptedException, IOException- Specified by:
perform
in interfaceSimpleBuildStep
- Throws:
InterruptedException
IOException
-
getRequiredMonitorService
- Specified by:
getRequiredMonitorService
in interfaceBuildStep
-
createAggregator
public hudson.matrix.MatrixAggregator createAggregator(hudson.matrix.MatrixBuild build, Launcher launcher, BuildListener listener) - Specified by:
createAggregator
in interfacehudson.matrix.MatrixAggregatable
-