Class PitPublisher

java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Publisher
hudson.tasks.Recorder
org.jenkinsci.plugins.pitmutation.PitPublisher
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Publisher>, hudson.tasks.BuildStep, jenkins.tasks.SimpleBuildStep

public class PitPublisher
extends hudson.tasks.Recorder
implements jenkins.tasks.SimpleBuildStep
The type Pit publisher.
Author:
edward
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  PitPublisher.DescriptorImpl
    The type Descriptor.
    static class  PitPublisher.ParseReportCallable
    The type Parse report callable.

    Nested classes/interfaces inherited from class hudson.tasks.Publisher

    hudson.tasks.Publisher.DescriptorExtensionListImpl

    Nested classes/interfaces inherited from interface hudson.tasks.BuildStep

    hudson.tasks.BuildStep.PublisherList

    Nested classes/interfaces inherited from interface hudson.ExtensionPoint

    hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson

    Nested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep

    jenkins.tasks.SimpleBuildStep.LastBuildAction, jenkins.tasks.SimpleBuildStep.LastBuildActionFactory
  • Field Summary

    Fields inherited from interface hudson.tasks.BuildStep

    BUILDERS, PUBLISHERS
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
      PitPublisher()
    Instantiates a new Pit publisher with Default-Values.
    protected PitPublisher​(String mutationStatsFile, float minimumKillRatio, boolean killRatioMustImprove)
    Instantiates a new Pit publisher.
  • Method Summary

    Modifier and Type Method Description
    hudson.model.Result decideBuildResult​(PitBuildAction action)
    Decide build result result.
    boolean getKillRatioMustImprove()
    Required by plugin config
    float getMinimumKillRatio()
    Required by plugin config
    String getMutationStatsFile()
    Required by plugin config
    hudson.model.Action getProjectAction​(hudson.model.AbstractProject<?,​?> project)
    hudson.tasks.BuildStepMonitor getRequiredMonitorService()  
    void perform​(hudson.model.Run<?,​?> build, hudson.FilePath workspace, hudson.Launcher launcher, hudson.model.TaskListener listener)  
    void setKillRatioMustImprove​(boolean killRatioMustImprove)  
    void setMinimumKillRatio​(float minimumKillRatio)  
    void setMutationStatsFile​(String mutationStatsFile)  

    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
  • Constructor Details

    • PitPublisher

      protected PitPublisher​(String mutationStatsFile, float minimumKillRatio, boolean killRatioMustImprove)
      Instantiates a new Pit publisher.
      Parameters:
      mutationStatsFile - the mutation stats file
      minimumKillRatio - the minimum kill ratio
      killRatioMustImprove - the kill ratio must improve
    • PitPublisher

      @DataBoundConstructor public PitPublisher()
      Instantiates a new Pit publisher with Default-Values.

      mutationStatsFile is set to **{@literal /}target/pit-reports/**{@literal /}mutations.xml, minimumKillRatio is set to 0.0, killRatioMustImprove is set to false,

  • Method Details

    • setMutationStatsFile

      @DataBoundSetter public void setMutationStatsFile​(String mutationStatsFile)
    • setMinimumKillRatio

      @DataBoundSetter public void setMinimumKillRatio​(float minimumKillRatio)
    • setKillRatioMustImprove

      @DataBoundSetter public void setKillRatioMustImprove​(boolean killRatioMustImprove)
    • perform

      public void perform​(@Nonnull hudson.model.Run<?,​?> build, @Nonnull hudson.FilePath workspace, @Nonnull hudson.Launcher launcher, @Nonnull hudson.model.TaskListener listener) throws InterruptedException, IOException
      Specified by:
      perform in interface jenkins.tasks.SimpleBuildStep
      Throws:
      InterruptedException
      IOException
    • 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
    • decideBuildResult

      public hudson.model.Result decideBuildResult​(PitBuildAction action)
      Decide build result result.
      Parameters:
      action - the action
      Returns:
      the worst result from all conditions
    • getMinimumKillRatio

      public float getMinimumKillRatio()
      Required by plugin config
      Returns:
      the minimum kill ratio
    • getKillRatioMustImprove

      public boolean getKillRatioMustImprove()
      Required by plugin config
      Returns:
      the kill ratio must improve
    • getMutationStatsFile

      public String getMutationStatsFile()
      Required by plugin config
      Returns:
      the mutation stats file
    • getRequiredMonitorService

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