{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
public class TestResult
Container for a result of a single test.
This is a copy of com.android.ddmlib.testrunner.TestResult.
Nested types |
|
|---|---|
TestResult.TestStatus |
|
Public fields |
|
|---|---|
long |
|
Map<String, String> |
|
String |
|
long |
|
TestResult.TestStatus |
|
Public constructors |
|
|---|---|
Public methods |
|
|---|---|
boolean |
|
long |
Return the |
Map<String, String> |
Get the associated test metrics. |
String |
Get the associated |
long |
Return the |
TestResult.TestStatus |
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. |
TestResult |
setStatus(TestResult.TestStatus status)Set the |
public long getEndTime()
Return the currentTimeMillis time that the testEnded event was received.
public String getStackTrace()
Get the associated String stack trace. Should be null if getStatus is PASSED.
public long getStartTime()
Return the currentTimeMillis time that the testStarted event was received.
public void setMetrics(Map<String, String> metrics)
Set the test metrics, overriding any previous values.