hudson.plugins.im.build_notify
Class PrintFailingTestsBuildToChatNotifier

java.lang.Object
  extended by hudson.plugins.im.build_notify.BuildToChatNotifier
      extended by hudson.plugins.im.build_notify.SummaryOnlyBuildToChatNotifier
          extended by hudson.plugins.im.build_notify.DefaultBuildToChatNotifier
              extended by hudson.plugins.im.build_notify.PrintFailingTestsBuildToChatNotifier
All Implemented Interfaces:
hudson.model.Describable<BuildToChatNotifier>

public class PrintFailingTestsBuildToChatNotifier
extends DefaultBuildToChatNotifier

Extends DefaultBuildToChatNotifier and also prints failed tests if any. Up to 5 failing tests are printed. Youngest failing tests are displayed first.

Author:
kutzi

Nested Class Summary
static class PrintFailingTestsBuildToChatNotifier.DescriptorImpl
           
 
Constructor Summary
PrintFailingTestsBuildToChatNotifier()
           
 
Method Summary
 java.lang.String buildCompletionMessage(IMPublisher publisher, hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener)
          Calculates the message to send out to a chat when the specified build is completed.
 java.lang.String culpritMessage(IMPublisher publisher, hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener)
          Calculates the message to send out to a 'culprit' of a broken build.
 java.lang.String suspectMessage(IMPublisher publisher, hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener, boolean firstFailure)
          Calculates the message to send out to a committer of a broken build.
 java.lang.String upstreamCommitterMessage(IMPublisher publisher, hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener, hudson.model.AbstractBuild<?,?> upstreamBuild)
          Calculates the message to send out to a committer of an upstream build if this build is broken.
 
Methods inherited from class hudson.plugins.im.build_notify.DefaultBuildToChatNotifier
buildStartMessage
 
Methods inherited from class hudson.plugins.im.build_notify.BuildToChatNotifier
all, fixerMessage, getDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintFailingTestsBuildToChatNotifier

@DataBoundConstructor
public PrintFailingTestsBuildToChatNotifier()
Method Detail

buildCompletionMessage

public java.lang.String buildCompletionMessage(IMPublisher publisher,
                                               hudson.model.AbstractBuild<?,?> build,
                                               hudson.model.BuildListener listener)
                                        throws java.io.IOException,
                                               java.lang.InterruptedException
Description copied from class: BuildToChatNotifier
Calculates the message to send out to a chat when the specified build is completed.

Overrides:
buildCompletionMessage in class DefaultBuildToChatNotifier
Parameters:
publisher - The publisher that's driving this. Never null.
build - The build that just completed. Never null.
listener - Any errors can be reported here.
Throws:
java.io.IOException
java.lang.InterruptedException

culpritMessage

public java.lang.String culpritMessage(IMPublisher publisher,
                                       hudson.model.AbstractBuild<?,?> build,
                                       hudson.model.BuildListener listener)
Description copied from class: BuildToChatNotifier
Calculates the message to send out to a 'culprit' of a broken build. I.e. a committer to a previous build which was broken and all builds since then have been broken.

Overrides:
culpritMessage in class BuildToChatNotifier
Parameters:
publisher - The publisher that's driving this. Never null.
build - The build that just completed. Never null.
listener - Any errors can be reported here.

suspectMessage

public java.lang.String suspectMessage(IMPublisher publisher,
                                       hudson.model.AbstractBuild<?,?> build,
                                       hudson.model.BuildListener listener,
                                       boolean firstFailure)
Description copied from class: BuildToChatNotifier
Calculates the message to send out to a committer of a broken build.

Overrides:
suspectMessage in class BuildToChatNotifier
Parameters:
publisher - The publisher that's driving this. Never null.
build - The build that just completed. Never null.
listener - Any errors can be reported here.

upstreamCommitterMessage

public java.lang.String upstreamCommitterMessage(IMPublisher publisher,
                                                 hudson.model.AbstractBuild<?,?> build,
                                                 hudson.model.BuildListener listener,
                                                 hudson.model.AbstractBuild<?,?> upstreamBuild)
Description copied from class: BuildToChatNotifier
Calculates the message to send out to a committer of an upstream build if this build is broken.

Overrides:
upstreamCommitterMessage in class BuildToChatNotifier
Parameters:
publisher - The publisher that's driving this. Never null.
build - The build that just completed. Never null.
listener - Any errors can be reported here.
upstreamBuild - The upstream build


Copyright © 2010. All Rights Reserved.