com.android.ddmlib.testrunner
Class TestResult

java.lang.Object
  extended by com.android.ddmlib.testrunner.TestResult

public class TestResult
extends java.lang.Object

Container for a result of a single test.


Nested Class Summary
static class TestResult.TestStatus
           
 
Constructor Summary
TestResult()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 long getEndTime()
          Return the System.currentTimeMillis() time that the ITestInvocationListener#testEnded(TestIdentifier) event was received.
 java.util.Map<java.lang.String,java.lang.String> getMetrics()
          Get the associated test metrics.
 java.lang.String getStackTrace()
          Get the associated String stack trace.
 long getStartTime()
          Return the System.currentTimeMillis() time that the ITestInvocationListener#testStarted(TestIdentifier) event was received.
 TestResult.TestStatus getStatus()
          Get the TestResult.TestStatus result of the test.
 int hashCode()
           
 void setEndTime(long currentTimeMillis)
          Sets the end time
 void setMetrics(java.util.Map<java.lang.String,java.lang.String> metrics)
          Set the test metrics, overriding any previous values.
 void setStackTrace(java.lang.String trace)
          Set the stack trace.
 TestResult setStatus(TestResult.TestStatus status)
          Set the TestResult.TestStatus.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestResult

public TestResult()
Method Detail

getStatus

public TestResult.TestStatus getStatus()
Get the TestResult.TestStatus result of the test.


getStackTrace

public java.lang.String getStackTrace()
Get the associated String stack trace. Should be null if getStatus() is TestStatus.PASSED.


getMetrics

public java.util.Map<java.lang.String,java.lang.String> getMetrics()
Get the associated test metrics.


setMetrics

public void setMetrics(java.util.Map<java.lang.String,java.lang.String> metrics)
Set the test metrics, overriding any previous values.


getStartTime

public long getStartTime()
Return the System.currentTimeMillis() time that the ITestInvocationListener#testStarted(TestIdentifier) event was received.


getEndTime

public long getEndTime()
Return the System.currentTimeMillis() time that the ITestInvocationListener#testEnded(TestIdentifier) event was received.


setStatus

public TestResult setStatus(TestResult.TestStatus status)
Set the TestResult.TestStatus.


setStackTrace

public void setStackTrace(java.lang.String trace)
Set the stack trace.


setEndTime

public void setEndTime(long currentTimeMillis)
Sets the end time


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object