{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

FlakyTest

@Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)  @Target(value = [java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE]) annotation FlakyTest


Designates a test as being flaky (non-deterministic).

Can then be used to filter tests on execution using -e annotation or -e notAnnotation as desired.

Summary

Public methods

abstract @NonNull int

An optional bug number associated with the test.

abstract @NonNull String

Details, such as the reason of why the test is flaky.

Public methods

bugId

@NonNull
public abstract int bugId()

An optional bug number associated with the test. -1 Means that no bug number is associated with the flaky annotation.

Returns
int

int

detail

@NonNull
public abstract String detail()

Details, such as the reason of why the test is flaky.

Returns
String

String