FailureDescription

public class FailureDescription
extends Object

java.lang.Object
   ↳ com.android.tradefed.result.FailureDescription


The class describing a failure information in Trade Federation. This class contains the debugging information and context of the failure that helps understanding the issue.

Summary

Public methods

static FailureDescription create(String errorMessage, TestRecordProto.FailureStatus status)

Create a FailureDescription based on the error message generated from the failure.

static FailureDescription create(String errorMessage)

Create a FailureDescription based on the error message generated from the failure.

boolean equals(Object obj)
ActionInProgress getActionInProgress()

Returns the action in progress during the failure.

Throwable getCause()

Returns the exception that caused the failure.

String getDebugHelpMessage()

Returns the debug help message.

ErrorIdentifier getErrorIdentifier()

Returns the ErrorIdentifier representing the failure.

String getErrorMessage()

Returns the error message associated with the failure.

TestRecordProto.FailureStatus getFailureStatus()

Returns the FailureStatus associated with the failure.

String getFormattedErrorMessage()

A formatted way of displaying the error and some details.

String getOrigin()

Returns the origin of the error.

int hashCode()
boolean isRetriable()

Returns whether or not the error is retriable or not.

boolean rerunFull()

Returns whether or not we need to retry the full run or not.

FailureDescription setActionInProgress(ActionInProgress action)

Sets the action in progress during the failure.

FailureDescription setCause(Throwable cause)

Sets the exception that caused the failure if any.

FailureDescription setDebugHelpMessage(String message)

Sets the debug help message for the failure.

FailureDescription setErrorIdentifier(ErrorIdentifier errorId)

Sets the ErrorIdentifier representing the failure.

void setErrorMessage(String errorMessage)

Sets the error message.

FailureDescription setFailureStatus(TestRecordProto.FailureStatus status)

Set the TestRecordProto.FailureStatus associated with the failure.

FailureDescription setFullRerun(boolean fullRerun)

Sets whether or not to rerun the full run when a run failure occurs.

FailureDescription setOrigin(String origin)

Sets the origin of the error.

FailureDescription setRetriable(boolean retriable)

Sets whether or not the failure is retriable.

String toString()

Public methods

create

public static FailureDescription create (String errorMessage, 
                TestRecordProto.FailureStatus status)

Create a FailureDescription based on the error message generated from the failure.

Parameters
errorMessage String: The error message from the failure.

status TestRecordProto.FailureStatus: The status associated with the failure.

Returns
FailureDescription the created FailureDescription

create

public static FailureDescription create (String errorMessage)

Create a FailureDescription based on the error message generated from the failure.

Parameters
errorMessage String: The error message from the failure.

Returns
FailureDescription the created FailureDescription

equals

public boolean equals (Object obj)

Parameters
obj Object

Returns
boolean

getActionInProgress

public ActionInProgress getActionInProgress ()

Returns the action in progress during the failure. Can be null.

Returns
ActionInProgress

getCause

public Throwable getCause ()

Returns the exception that caused the failure. Can be null.

Returns
Throwable

getDebugHelpMessage

public String getDebugHelpMessage ()

Returns the debug help message. Can be null.

Returns
String

getErrorIdentifier

public ErrorIdentifier getErrorIdentifier ()

Returns the ErrorIdentifier representing the failure. Can be null.

Returns
ErrorIdentifier

getErrorMessage

public String getErrorMessage ()

Returns the error message associated with the failure.

Returns
String

getFailureStatus

public TestRecordProto.FailureStatus getFailureStatus ()

Returns the FailureStatus associated with the failure. Can be null.

Returns
TestRecordProto.FailureStatus

getFormattedErrorMessage

public String getFormattedErrorMessage ()

A formatted way of displaying the error and some details.

Returns
String

getOrigin

public String getOrigin ()

Returns the origin of the error. Can be null.

Returns
String

hashCode

public int hashCode ()

Returns
int

isRetriable

public boolean isRetriable ()

Returns whether or not the error is retriable or not.

Returns
boolean

rerunFull

public boolean rerunFull ()

Returns whether or not we need to retry the full run or not.

Returns
boolean

setActionInProgress

public FailureDescription setActionInProgress (ActionInProgress action)

Sets the action in progress during the failure.

Parameters
action ActionInProgress

Returns
FailureDescription

setCause

public FailureDescription setCause (Throwable cause)

Sets the exception that caused the failure if any.

Parameters
cause Throwable

Returns
FailureDescription

setDebugHelpMessage

public FailureDescription setDebugHelpMessage (String message)

Sets the debug help message for the failure.

Parameters
message String

Returns
FailureDescription

setErrorIdentifier

public FailureDescription setErrorIdentifier (ErrorIdentifier errorId)

Sets the ErrorIdentifier representing the failure.

Parameters
errorId ErrorIdentifier

Returns
FailureDescription

setErrorMessage

public void setErrorMessage (String errorMessage)

Sets the error message.

Parameters
errorMessage String

setFailureStatus

public FailureDescription setFailureStatus (TestRecordProto.FailureStatus status)

Set the TestRecordProto.FailureStatus associated with the failure.

Parameters
status TestRecordProto.FailureStatus

Returns
FailureDescription

setFullRerun

public FailureDescription setFullRerun (boolean fullRerun)

Sets whether or not to rerun the full run when a run failure occurs.

Parameters
fullRerun boolean

Returns
FailureDescription

setOrigin

public FailureDescription setOrigin (String origin)

Sets the origin of the error.

Parameters
origin String

Returns
FailureDescription

setRetriable

public FailureDescription setRetriable (boolean retriable)

Sets whether or not the failure is retriable.

Parameters
retriable boolean

Returns
FailureDescription

toString

public String toString ()

Returns
String