org.tap4j.plugin
Class TapPublisher

java.lang.Object
  extended by hudson.tasks.BuildStepCompatibilityLayer
      extended by hudson.tasks.Publisher
          extended by hudson.tasks.Recorder
              extended by org.tap4j.plugin.TapPublisher
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.matrix.MatrixAggregatable, hudson.model.Describable<hudson.tasks.Publisher>, hudson.tasks.BuildStep

public class TapPublisher
extends hudson.tasks.Recorder
implements hudson.matrix.MatrixAggregatable

Publishes TAP results in Jenkins builds.

Since:
1.0
Author:
Bruno P. Kinoshita - http://www.kinoshita.eti.br

Nested Class Summary
static class TapPublisher.DescriptorImpl
           
 
Nested classes/interfaces inherited from class hudson.tasks.Publisher
hudson.tasks.Publisher.DescriptorExtensionListImpl
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList
 
Field Summary
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
TapPublisher(String testResults, Boolean failIfNoResults, Boolean failedTestsMarkBuildAsFailure, Boolean outputTapToConsole, Boolean enableSubtests, Boolean discardOldReports, Boolean todoIsFailure)
           
 
Method Summary
 hudson.matrix.MatrixAggregator createAggregator(hudson.matrix.MatrixBuild build, hudson.Launcher launcher, hudson.model.BuildListener listener)
           
 Boolean getDiscardOldReports()
           
 Boolean getEnableSubtests()
           
 Boolean getFailedTestsMarkBuildAsFailure()
           
 Boolean getFailIfNoResults()
           
 Boolean getOutputTapToConsole()
           
 hudson.model.Action getProjectAction(hudson.model.AbstractProject<?,?> project)
           
static hudson.FilePath getReportsDirectory(hudson.model.AbstractBuild<?,?> build)
          Gets the directory where the plug-in saves its TAP streams before processing them and displaying in the UI.
 hudson.tasks.BuildStepMonitor getRequiredMonitorService()
           
 String getTestResults()
           
 Boolean getTodoIsFailure()
           
 boolean perform(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener)
           
 Object readResolve()
           
 
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, 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, prebuild
 

Constructor Detail

TapPublisher

@DataBoundConstructor
public TapPublisher(String testResults,
                                         Boolean failIfNoResults,
                                         Boolean failedTestsMarkBuildAsFailure,
                                         Boolean outputTapToConsole,
                                         Boolean enableSubtests,
                                         Boolean discardOldReports,
                                         Boolean todoIsFailure)
Method Detail

readResolve

public Object readResolve()

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

getReportsDirectory

public static hudson.FilePath getReportsDirectory(hudson.model.AbstractBuild<?,?> 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 hudson.model.Action getProjectAction(hudson.model.AbstractProject<?,?> project)
Specified by:
getProjectAction in interface hudson.tasks.BuildStep
Overrides:
getProjectAction in class hudson.tasks.BuildStepCompatibilityLayer

perform

public boolean perform(hudson.model.AbstractBuild<?,?> build,
                       hudson.Launcher launcher,
                       hudson.model.BuildListener listener)
                throws InterruptedException,
                       IOException
Specified by:
perform in interface hudson.tasks.BuildStep
Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer
Throws:
InterruptedException
IOException

getRequiredMonitorService

public hudson.tasks.BuildStepMonitor getRequiredMonitorService()
Specified by:
getRequiredMonitorService in interface hudson.tasks.BuildStep

createAggregator

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


Copyright © 2011-2013 Jenkins. All Rights Reserved.