Class GetTestDataMethodObject
java.lang.Object
hudson.plugins.junitattachments.GetTestDataMethodObject
This class is a helper for
hudson.tasks.junit.TestDataPublisher.getTestData(AbstractBuild<?, ?>, Launcher,
BuildListener, TestResult).- Author:
- mfriedenhagen, Kohsuke Kawaguchi
-
Constructor Summary
ConstructorsConstructorDescriptionGetTestDataMethodObject(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener, hudson.tasks.junit.TestResult testResult) Deprecated.GetTestDataMethodObject(Run<?, ?> build, FilePath workspace, Launcher launcher, TaskListener listener, hudson.tasks.junit.TestResult testResult) -
Method Summary
Modifier and TypeMethodDescriptionReturns a Map of classname vs.
-
Constructor Details
-
GetTestDataMethodObject
@Deprecated public GetTestDataMethodObject(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener, hudson.tasks.junit.TestResult testResult) Deprecated.PredatesArtifactManager-based publishing; attachments collected via this constructor are always written to the legacy, filesystem-based storage location on the controller.- Parameters:
build- seebuildtestResult- seetestResult
-
GetTestDataMethodObject
public GetTestDataMethodObject(Run<?, ?> build, @NonNull FilePath workspace, Launcher launcher, TaskListener listener, hudson.tasks.junit.TestResult testResult) - Parameters:
build- seebuildtestResult- seetestResult
-
-
Method Details
-
getEnclosingBlocks
-
getAttachments
public Map<String, Map<String, List<String>>> getAttachments() throws IllegalStateException, IOException, InterruptedExceptionReturns a Map of classname vs. the stored attachments in a directory named as the test class.As a side effect, any newly discovered attachments are staged on the agent and archived through the build's
ArtifactManager(unless this instance was constructed via the deprecated constructor). The staging area is always removed before this method returns, regardless of success or failure.- Returns:
- the map
- Throws:
InterruptedExceptionIOExceptionIllegalStateExceptionInterruptedException
-
ArtifactManager-based publishing; attachments collected via this constructor are always written to the legacy, filesystem-based storage location on the controller.