{% 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 constructors |
|
|---|---|
Public methods |
|
|---|---|
@NonNull boolean |
|
@NonNull long |
Return the |
@NonNull Map<@NonNull String, @NonNull String> |
Get the associated test metrics. |
@NonNull String |
Get the associated |
@NonNull long |
Return the |
@NonNull TestResult.TestStatus |
Get the |
@NonNull int |
hashCode() |
@NonNull void |
setEndTime(@NonNull long currentTimeMillis)Sets the end time |
@NonNull void |
Set the test metrics, overriding any previous values. |
@NonNull void |
setStackTrace(@NonNull String trace)Set the stack trace. |
@NonNull TestResult |
setStatus(@NonNull TestResult.TestStatus status)Set the |
@NonNull
public long getEndTime()
Return the System#currentTimeMillis() time that the testEnded event was received.
@NonNull
public Map<@NonNull String, @NonNull String> getMetrics()
Get the associated test metrics.
@NonNull
public String getStackTrace()
Get the associated String stack trace. Should be null if is TestStatus#PASSED.
@NonNull
public long getStartTime()
Return the System#currentTimeMillis() time that the testStarted event was received.
@NonNull
public void setMetrics(@NonNull Map<@NonNull String, @NonNull String> metrics)
Set the test metrics, overriding any previous values.
@NonNull
public TestResult setStatus(@NonNull TestResult.TestStatus status)
Set the TestStatus.