org.jvnet.hudson.test
Class TestBuilder
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Builder
org.jvnet.hudson.test.TestBuilder
- All Implemented Interfaces:
- ExtensionPoint, Describable<Builder>, BuildStep
public abstract class TestBuilder
- extends Builder
Partial Builder
implementation for writing a one-off throw-away builder used during tests.
Because this builder tends to be written as an inner class, this builder doesn't write itself
to a disk when persisted. Configuration screen won't work, either.
- Author:
- Kohsuke Kawaguchi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestBuilder
public TestBuilder()
perform
public abstract boolean perform(AbstractBuild<?,?> build,
Launcher launcher,
BuildListener listener)
throws InterruptedException,
IOException
- Description copied from interface:
BuildStep
- Runs the step over the given build and reports the progress to the listener.
A plugin can contribute the action object to Actionable.getActions()
so that a 'report' becomes a part of the persisted data of Build
.
This is how JUnit plugin attaches the test report to a build page, for example.
- Specified by:
perform
in interface BuildStep
- Overrides:
perform
in class BuildStepCompatibilityLayer
- Returns:
- true if the build can continue, false if there was an error
and the build needs to be aborted.
Using the return value to indicate success/failure should
be considered deprecated, and implementations are encouraged
to throw AbortException
to indicate a failure.
- Throws:
InterruptedException
- If the build is interrupted by the user (in an attempt to abort the build.)
Normally the BuildStep
implementations may simply forward the exception
it got from its lower-level functions.
IOException
- If the implementation wants to abort the processing when an IOException
happens, it can simply propagate the exception to the caller. This will cause
the build to fail, with the default error message.
Implementations are encouraged to catch IOException
on its own to
provide a better error message, if it can do so, so that users have better
understanding on why it failed.
getDescriptor
public Descriptor<Builder> getDescriptor()
- Description copied from interface:
Describable
- Gets the descriptor for this instance.
Descriptor
is a singleton for every concrete Describable
implementation, so if a.getClass()==b.getClass() then
a.getDescriptor()==b.getDescriptor() must hold.
- Specified by:
getDescriptor
in interface Describable<Builder>
- Overrides:
getDescriptor
in class Builder
Copyright © 2004-2013. All Rights Reserved.