@ExportedBean public abstract class TestObject extends TestObject
Constructor and Description |
---|
TestObject() |
Modifier and Type | Method and Description |
---|---|
org.kohsuke.stapler.HttpResponse |
doSubmitDescription(String description) |
abstract TestResult |
findCorrespondingResult(String id)
Find the test result corresponding to the one identified by
id>
within this test result. |
hudson.model.Api |
getApi()
Exposes this object through the remote API.
|
String |
getDescription() |
abstract float |
getDuration()
Time took to run this test.
|
String |
getDurationString()
Returns the string representation of the
getDuration() , in a
human readable format. |
Object |
getDynamic(String token,
org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
abstract int |
getFailCount()
Gets the total number of failed tests.
|
String |
getFullDisplayName() |
String |
getFullName()
Gets the full name of this object.
|
History |
getHistory() |
String |
getId() |
String |
getName()
Gets the name of this object.
|
abstract TestObject |
getParent()
Reverse pointer of
TabulatedResult.getChildren() . |
abstract int |
getPassCount()
Gets the total number of passed tests.
|
abstract TestResult |
getPreviousResult()
Gets the counterpart of this
TestResult in the previous run. |
String |
getRelativePathFrom(TestObject it)
Computes the relative path to get to this test object from
it . |
TestResult |
getResultInBuild(hudson.model.AbstractBuild<?,?> build)
Deprecated.
|
TestResult |
getResultInRun(hudson.model.Run<?,?> run)
Gets the counterpart of this
TestResult in the specified run. |
String |
getSafeName()
Gets the version of
getName() that's URL-safe. |
String |
getSearchUrl() |
abstract int |
getSkipCount()
Gets the total number of skipped tests.
|
<T> T |
getTestAction(Class<T> klazz)
Gets a test action of the class passed in.
|
List<TestAction> |
getTestActions()
Get a list of all TestActions associated with this TestObject.
|
TestResult |
getTestResult()
Deprecated.
This method returns a JUnit specific class. Use
getTopLevelTestResult() instead for a more general interface. |
AbstractTestResultAction |
getTestResultAction()
Subclasses may override this method if they are
associated with a particular subclass of
AbstractTestResultAction.
|
TestResult |
getTopLevelTestResult()
Returns the top level test result data.
|
int |
getTotalCount()
Gets the total number of tests.
|
String |
getUrl()
Returns url relative to TestResult
|
static String |
safe(String s)
Replaces URL-unsafe characters.
|
void |
setDescription(String description) |
protected String |
uniquifyName(Collection<? extends TestObject> siblings,
String base)
#2988: uniquifies a
getSafeName() amongst children of the parent. |
getOwner, getRun
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
public abstract TestObject getParent()
TabulatedResult.getChildren()
.getParent
in class TestObject
public final String getId()
getId
in class TestObject
public String getUrl()
getUrl
in class TestObject
public String getFullDisplayName()
public TestResult getTestResult()
getTopLevelTestResult()
instead for a more general interface.getTestResult
in class TestObject
public TestResult getTopLevelTestResult()
public String getRelativePathFrom(TestObject it)
it
. If
it
does not appear in the parent chain for this object, a
relative path from the server root will be returned.public AbstractTestResultAction getTestResultAction()
getTestResultAction
in class TestObject
@Exported(visibility=3) public List<TestAction> getTestActions()
getTestActions
in class TestObject
public <T> T getTestAction(Class<T> klazz)
getTestAction
in class TestObject
T
- an instance of the class passed inklazz
- public abstract TestResult getPreviousResult()
TestResult
in the previous run.getPreviousResult
in class TestObject
@Deprecated public TestResult getResultInBuild(hudson.model.AbstractBuild<?,?> build)
getResultInBuild
in class TestObject
public TestResult getResultInRun(hudson.model.Run<?,?> run)
TestResult
in the specified run.getResultInRun
in class TestObject
public abstract TestResult findCorrespondingResult(String id)
id>
within this test result.id
- The path to the original test resultpublic abstract float getDuration()
getDuration
in class TestObject
public String getDurationString()
getDuration()
, in a
human readable format.getDurationString
in class TestObject
public String getDescription()
getDescription
in class TestObject
public void setDescription(String description)
setDescription
in class TestObject
public hudson.model.Api getApi()
getApi
in class TestObject
public String getName()
getName
in class TestObject
public String getFullName()
public String getSafeName()
getName()
that's URL-safe.getSafeName
in class TestObject
public String getSearchUrl()
getSearchUrl
in interface hudson.search.SearchItem
getSearchUrl
in class TestObject
protected final String uniquifyName(Collection<? extends TestObject> siblings, String base)
getSafeName()
amongst children of the parent.public static String safe(String s)
public abstract int getPassCount()
getPassCount
in class TestObject
public abstract int getFailCount()
getFailCount
in class TestObject
public abstract int getSkipCount()
getSkipCount
in class TestObject
public int getTotalCount()
getTotalCount
in class TestObject
public History getHistory()
getHistory
in class TestObject
public Object getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
public org.kohsuke.stapler.HttpResponse doSubmitDescription(@QueryParameter String description) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
Copyright © 2015. All rights reserved.