TestFailureEvent


public class TestFailureEvent extends TestRunEventWithTestCase

Known direct subclasses
TestAssumptionFailureEvent

Denotes that the test ended with a TEST_ASSUMPTION_FAILURE.


Denotes that the test ended with a TEST_FAILURE. It has the FailureInfo object to denote what was the cause of the failure/error.

Summary

Public fields

final @NonNull FailureInfo

Public constructors

TestFailureEvent(
    @NonNull TestCaseInfo testCase,
    @NonNull FailureInfo failure
)

Constructor to create TestFailureEvent.

Public methods

void
writeToParcel(Parcel parcel, int i)

Inherited fields

From androidx.test.services.events.run.TestRunEventWithTestCase
final @NonNull TestCaseInfo

The TestCaseInfo this event is associated with.

Inherited methods

From android.os.Parcelable
abstract int
abstract void
writeToParcel(Parcel p, int p1)
From androidx.test.services.events.run.TestRunEvent

Public fields

failure

public final @NonNull FailureInfo failure

Public constructors

TestFailureEvent

public TestFailureEvent(
    @NonNull TestCaseInfo testCase,
    @NonNull FailureInfo failure
)

Constructor to create TestFailureEvent.

Parameters
@NonNull TestCaseInfo testCase

the test case that this event is for.

@NonNull FailureInfo failure

the failure associated with the test case.

Public methods

writeToParcel

public void writeToParcel(Parcel parcel, int i)