# FlakyTest

Artifact: [androidx.test:runner](https://developer.android.com/jetpack/androidx/releases/test) [View Source](https://cs.android.com/search?q=file:androidx/test/filters/FlakyTest.java+class:androidx.test.filters.FlakyTest)

*** ** * ** ***


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

<br />

*** ** * ** ***

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 int` | `https://developer.android.com/reference/androidx/test/filters/FlakyTest#bugId()()` An optional bug number associated with the test. -1 Means that no bug number is associated with the flaky annotation. |
| `abstract https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/test/filters/FlakyTest#detail()()` Details, such as the reason of why the test is flaky. |

## Public methods

### bugId

```
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

```
public abstract String detail()
```

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

| Returns |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html` | String |