|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.model.AbstractModelObject
hudson.tasks.junit.TestObject
hudson.tasks.test.TestObject
@ExportedBean public abstract class TestObject
Base class for all test result objects. For compatibility with code that expects this class to be in hudson.tasks.junit, we've created a pure-abstract class, hudson.tasks.junit.TestObject. That stub class is deprecated; instead, people should use this class.
| Constructor Summary | |
|---|---|
TestObject()
|
|
| Method Summary | ||
|---|---|---|
org.kohsuke.stapler.HttpResponse |
doSubmitDescription(String description)
|
|
abstract TestResult |
findCorrespondingResult(String id)
Find the test result corresponding to the one identified by id>
withint this test result. |
|
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. |
|
History |
getHistory()
|
|
String |
getId()
|
|
String |
getName()
Gets the name of this object. |
|
abstract AbstractBuild<?,?> |
getOwner()
|
|
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. |
|
abstract TestResult |
getResultInBuild(AbstractBuild<?,?> build)
Gets the counterpart of this TestResult in the specified run. |
|
String |
getSafeName()
Gets the version of getName() that's URL-safe. |
|
String |
getSearchUrl()
Returns the URL of this item relative to the parent SearchItem. |
|
abstract int |
getSkipCount()
Gets the total number of skipped tests. |
|
|
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. |
|
| Methods inherited from class hudson.model.AbstractModelObject |
|---|
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface hudson.model.ModelObject |
|---|
getDisplayName |
| Constructor Detail |
|---|
public TestObject()
| Method Detail |
|---|
public abstract AbstractBuild<?,?> getOwner()
getOwner in class TestObjectpublic abstract TestObject getParent()
TabulatedResult.getChildren().
getParent in class TestObjectpublic final String getId()
getId in class TestObjectpublic String getUrl()
getUrl in class TestObjectpublic TestResult getTestResult()
getTopLevelTestResult() instead for a more general interface.
getTestResult in class TestObjectpublic 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 TestObjectpublic List<TestAction> getTestActions()
getTestActions in class TestObjectpublic <T> T getTestAction(Class<T> klazz)
getTestAction in class TestObjectT - an instance of the class passed inklazz -
public abstract TestResult getPreviousResult()
TestResult in the previous run.
getPreviousResult in class TestObjectpublic abstract TestResult getResultInBuild(AbstractBuild<?,?> build)
TestResult in the specified run.
getResultInBuild in class TestObjectpublic abstract TestResult findCorrespondingResult(String id)
id>
withint this test result.
id - The path to the original test result
public abstract float getDuration()
getDuration in class TestObjectpublic String getDurationString()
getDuration(), in a
human readable format.
getDurationString in class TestObjectpublic String getDescription()
getDescription in class TestObjectpublic void setDescription(String description)
setDescription in class TestObjectpublic Api getApi()
getApi in class TestObjectpublic String getName()
getName in class TestObjectpublic String getSafeName()
getName() that's URL-safe.
getSafeName in class TestObjectpublic String getSearchUrl()
SearchItemSearchItem.
getSearchUrl in interface SearchItemgetSearchUrl 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 TestObjectpublic abstract int getFailCount()
getFailCount in class TestObjectpublic abstract int getSkipCount()
getSkipCount in class TestObjectpublic int getTotalCount()
getTotalCount in class TestObjectpublic 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||