Package hudson.tasks.junit
Class JUnitResultArchiver
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Recorder
-
- hudson.tasks.junit.JUnitResultArchiver
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Publisher>
,BuildStep
,JUnitTask
,SimpleBuildStep
public class JUnitResultArchiver extends Recorder implements SimpleBuildStep, JUnitTask
Generates HTML report from JUnit test result XML files.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JUnitResultArchiver.DescriptorImpl
-
Nested 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
Constructors Constructor Description JUnitResultArchiver(String testResults)
JUnitResultArchiver(String testResults, boolean keepLongStdio, boolean keepProperties, DescribableList<TestDataPublisher,Descriptor<TestDataPublisher>> testDataPublishers, double healthScaleFactor)
Deprecated.JUnitResultArchiver(String testResults, boolean keepLongStdio, DescribableList<TestDataPublisher,Descriptor<TestDataPublisher>> testDataPublishers)
Deprecated.JUnitResultArchiver(String testResults, DescribableList<TestDataPublisher,Descriptor<TestDataPublisher>> testDataPublishers)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getChecksName()
double
getHealthScaleFactor()
BuildStepMonitor
getRequiredMonitorService()
String
getStdioRetention()
List<TestDataPublisher>
getTestDataPublishers()
String
getTestResults()
boolean
isAllowEmptyResults()
boolean
isKeepLongStdio()
Deprecated.boolean
isKeepProperties()
boolean
isSkipMarkingBuildUnstable()
boolean
isSkipOldReports()
boolean
isSkipPublishingChecks()
Should we skip publishing checks to the checks API plugin.protected TestResult
parse(String expandedTestResults, AbstractBuild build, Launcher launcher, BuildListener listener)
Deprecated.static TestResultAction
parseAndAttach(JUnitTask task, PipelineTestDetails pipelineTestDetails, Run build, FilePath workspace, Launcher launcher, TaskListener listener)
static TestResultSummary
parseAndSummarize(JUnitTask task, PipelineTestDetails pipelineTestDetails, Run<?,?> build, FilePath workspace, Launcher launcher, TaskListener listener)
protected TestResult
parseResult(org.apache.tools.ant.DirectoryScanner ds, long buildTime)
Deprecated.since 2009-08-10.void
perform(Run build, FilePath workspace, Launcher launcher, TaskListener listener)
void
setAllowEmptyResults(boolean allowEmptyResults)
void
setChecksName(String checksName)
void
setHealthScaleFactor(double healthScaleFactor)
void
setKeepLongStdio(boolean keepLongStdio)
Deprecated.void
setKeepProperties(boolean keepProperties)
void
setSkipMarkingBuildUnstable(boolean skipMarkingBuildUnstable)
void
setSkipOldReports(boolean skipOldReports)
void
setSkipPublishingChecks(boolean skipPublishingChecks)
void
setStdioRetention(String stdioRetention)
void
setTestDataPublishers(List<TestDataPublisher> testDataPublishers)
-
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
getProjectAction, 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
getProjectAction, getProjectActions, perform, prebuild
-
Methods inherited from interface hudson.tasks.junit.JUnitTask
getParsedStdioRetention
-
Methods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
-
-
-
Constructor Detail
-
JUnitResultArchiver
@DataBoundConstructor public JUnitResultArchiver(String testResults)
-
JUnitResultArchiver
@Deprecated public JUnitResultArchiver(String testResults, DescribableList<TestDataPublisher,Descriptor<TestDataPublisher>> testDataPublishers)
Deprecated.
-
JUnitResultArchiver
@Deprecated public JUnitResultArchiver(String testResults, boolean keepLongStdio, DescribableList<TestDataPublisher,Descriptor<TestDataPublisher>> testDataPublishers)
Deprecated.
-
JUnitResultArchiver
@Deprecated public JUnitResultArchiver(String testResults, boolean keepLongStdio, boolean keepProperties, DescribableList<TestDataPublisher,Descriptor<TestDataPublisher>> testDataPublishers, double healthScaleFactor)
Deprecated.
-
-
Method Detail
-
parse
@Deprecated protected TestResult parse(String expandedTestResults, AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException
Deprecated.- Throws:
IOException
InterruptedException
-
perform
public void perform(Run build, FilePath workspace, Launcher launcher, TaskListener listener) throws InterruptedException, IOException
- Specified by:
perform
in interfaceSimpleBuildStep
- Throws:
InterruptedException
IOException
-
parseAndAttach
@Deprecated public static TestResultAction parseAndAttach(@NonNull JUnitTask task, PipelineTestDetails pipelineTestDetails, Run build, FilePath workspace, Launcher launcher, TaskListener listener) throws InterruptedException, IOException
Deprecated.- Throws:
InterruptedException
IOException
-
parseAndSummarize
public static TestResultSummary parseAndSummarize(@NonNull JUnitTask task, PipelineTestDetails pipelineTestDetails, Run<?,?> build, FilePath workspace, Launcher launcher, TaskListener listener) throws InterruptedException, IOException
- Throws:
InterruptedException
IOException
-
parseResult
protected TestResult parseResult(org.apache.tools.ant.DirectoryScanner ds, long buildTime) throws IOException
Deprecated.since 2009-08-10.Not actually used, but left for backward compatibility- Parameters:
ds
- Directory scanner.buildTime
- Build Time.- Returns:
- a
TestResult
. - Throws:
IOException
- if an error occurs.
-
getRequiredMonitorService
public BuildStepMonitor getRequiredMonitorService()
- Specified by:
getRequiredMonitorService
in interfaceBuildStep
-
getTestResults
public String getTestResults()
- Specified by:
getTestResults
in interfaceJUnitTask
-
getHealthScaleFactor
public double getHealthScaleFactor()
- Specified by:
getHealthScaleFactor
in interfaceJUnitTask
-
setHealthScaleFactor
@DataBoundSetter public final void setHealthScaleFactor(double healthScaleFactor)
- Parameters:
healthScaleFactor
- Health scale factor.- Since:
- 1.2-beta-1
-
getTestDataPublishers
@NonNull public List<TestDataPublisher> getTestDataPublishers()
- Specified by:
getTestDataPublishers
in interfaceJUnitTask
-
setTestDataPublishers
@DataBoundSetter public final void setTestDataPublishers(@NonNull List<TestDataPublisher> testDataPublishers)
- Parameters:
testDataPublishers
- Test data publishers.- Since:
- 1.2
-
setKeepLongStdio
@Deprecated @DataBoundSetter public final void setKeepLongStdio(boolean keepLongStdio)
Deprecated.- Parameters:
keepLongStdio
- Whether to keep long stdio.- Since:
- 1.2-beta-1
-
isKeepLongStdio
@Deprecated public boolean isKeepLongStdio()
Deprecated.- Specified by:
isKeepLongStdio
in interfaceJUnitTask
-
getStdioRetention
public String getStdioRetention()
- Specified by:
getStdioRetention
in interfaceJUnitTask
- Returns:
- the stdioRetention
-
setStdioRetention
@DataBoundSetter public final void setStdioRetention(String stdioRetention)
- Parameters:
stdioRetention
- How to keep long stdio.
-
isKeepProperties
public boolean isKeepProperties()
- Specified by:
isKeepProperties
in interfaceJUnitTask
- Returns:
- the keepProperties.
-
setKeepProperties
@DataBoundSetter public final void setKeepProperties(boolean keepProperties)
-
isAllowEmptyResults
public boolean isAllowEmptyResults()
- Specified by:
isAllowEmptyResults
in interfaceJUnitTask
- Returns:
- the allowEmptyResults
-
isSkipPublishingChecks
public boolean isSkipPublishingChecks()
Should we skip publishing checks to the checks API plugin.- Specified by:
isSkipPublishingChecks
in interfaceJUnitTask
- Returns:
- if publishing checks should be skipped,
false
otherwise
-
setSkipPublishingChecks
@DataBoundSetter public void setSkipPublishingChecks(boolean skipPublishingChecks)
-
getChecksName
public String getChecksName()
- Specified by:
getChecksName
in interfaceJUnitTask
-
setChecksName
@DataBoundSetter public void setChecksName(String checksName)
-
setAllowEmptyResults
@DataBoundSetter public final void setAllowEmptyResults(boolean allowEmptyResults)
-
isSkipMarkingBuildUnstable
public boolean isSkipMarkingBuildUnstable()
-
setSkipMarkingBuildUnstable
@DataBoundSetter public void setSkipMarkingBuildUnstable(boolean skipMarkingBuildUnstable)
-
isSkipOldReports
public boolean isSkipOldReports()
- Specified by:
isSkipOldReports
in interfaceJUnitTask
-
setSkipOldReports
@DataBoundSetter public void setSkipOldReports(boolean skipOldReports)
-
-