TestResult


public class TestResult


Container for a result of a single test.

This is a copy of com.android.ddmlib.testrunner.TestResult.

Summary

Nested types

Public constructors

Public methods

boolean
long

Return the currentTimeMillis time that the testEnded event was received.

Map<StringString>

Get the associated test metrics.

String

Get the associated String stack trace.

long

Return the currentTimeMillis time that the testStarted event was received.

TestResult.TestStatus

Get the TestStatus result of the test.

int
void
setEndTime(long currentTimeMillis)

Sets the end time

void

Set the test metrics, overriding any previous values.

void

Set the stack trace.

TestResult

Set the TestStatus.

Public fields

endTime

public long endTime

metrics

public Map<StringStringmetrics

stackTrace

public String stackTrace

startTime

public long startTime

status

public TestResult.TestStatus status

Public constructors

TestResult

public TestResult()

Public methods

equals

public boolean equals(Object obj)

getEndTime

public long getEndTime()

Return the currentTimeMillis time that the testEnded event was received.

getMetrics

public Map<StringStringgetMetrics()

Get the associated test metrics.

getStackTrace

public String getStackTrace()

Get the associated String stack trace. Should be null if getStatus is PASSED.

getStartTime

public long getStartTime()

Return the currentTimeMillis time that the testStarted event was received.

getStatus

public TestResult.TestStatus getStatus()

Get the TestStatus result of the test.

hashCode

public int hashCode()

setEndTime

public void setEndTime(long currentTimeMillis)

Sets the end time

setMetrics

public void setMetrics(Map<StringString> metrics)

Set the test metrics, overriding any previous values.

setStackTrace

public void setStackTrace(String trace)

Set the stack trace.

setStatus

public TestResult setStatus(TestResult.TestStatus status)

Set the TestStatus.