TestResult
public
class
TestResult
extends Object
| java.lang.Object | |
| ↳ | com.android.ddmlib.testrunner.TestResult |
Container for a result of a single test.
Summary
Public constructors | |
|---|---|
TestResult()
|
|
Public methods | |
|---|---|
boolean
|
equals(Object obj)
|
long
|
getEndTime()
Return the |
Map<String, String>
|
getMetrics()
Get the associated test metrics. |
String
|
getStackTrace()
Get the associated |
long
|
getStartTime()
Return the |
TestResult.TestStatus
|
getStatus()
Get the |
int
|
hashCode()
|
void
|
setEndTime(long currentTimeMillis)
Sets the end time |
void
|
setMetrics(Map<String, String> metrics)
Set the test metrics, overriding any previous values. |
void
|
setStackTrace(String trace)
Set the stack trace. |
void
|
setStartTime(long startTime)
Allows to set the time when the test was started, to be used with |
TestResult
|
setStatus(TestResult.TestStatus status)
Set the |
Public constructors
TestResult
public TestResult ()
Public methods
equals
public boolean equals (Object obj)
| Parameters | |
|---|---|
obj |
Object |
| Returns | |
|---|---|
boolean |
|
getEndTime
public long getEndTime ()
Return the System.currentTimeMillis() time that the ITestRunListener.testEnded(TestIdentifier,Map) event was received.
| Returns | |
|---|---|
long |
|
getMetrics
public Map<String, String> getMetrics ()
Get the associated test metrics.
| Returns | |
|---|---|
Map<String, String> |
|
getStackTrace
public String getStackTrace ()
Get the associated String stack trace. Should be null if getStatus() is TestStatus.PASSED.
| Returns | |
|---|---|
String |
|
getStartTime
public long getStartTime ()
Return the System.currentTimeMillis() time that the ITestRunListener.testStarted(TestIdentifier) event was received.
| Returns | |
|---|---|
long |
|
getStatus
public TestResult.TestStatus getStatus ()
Get the TestStatus result of the test.
| Returns | |
|---|---|
TestResult.TestStatus |
|
hashCode
public int hashCode ()
| Returns | |
|---|---|
int |
|
setEndTime
public void setEndTime (long currentTimeMillis)
Sets the end time
| Parameters | |
|---|---|
currentTimeMillis |
long |
setMetrics
public void setMetrics (Map<String, String> metrics)
Set the test metrics, overriding any previous values.
| Parameters | |
|---|---|
metrics |
Map |
setStackTrace
public void setStackTrace (String trace)
Set the stack trace.
| Parameters | |
|---|---|
trace |
String |
setStartTime
public void setStartTime (long startTime)
Allows to set the time when the test was started, to be used with ERROR(ITestRunListener.testStarted(TestIdentifier,long)/com.android.ddmlib.testrunner.ITestRunListener#testStarted(com.android.ddmlib.testrunner.TestIdentifier,long) ITestRunListener.testStarted(TestIdentifier,long)).
| Parameters | |
|---|---|
startTime |
long |
setStatus
public TestResult setStatus (TestResult.TestStatus status)
Set the TestStatus.
| Parameters | |
|---|---|
status |
TestResult.TestStatus |
| Returns | |
|---|---|
TestResult |
|