# FlakyTest

Summary:[Methods](https://developer.android.com/reference/android/support/test/filters/FlakyTest#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/test/filters/FlakyTest#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/filters/FlakyTest#)  

# FlakyTest

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


abstract
@interface
FlakyTest
`  
`


implements

`[Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation.html)`


`

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

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/filters/FlakyTest#)From interface` `[java.lang.annotation.Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation.html)` ` |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` abstract `[Class](https://developer.android.com/reference/java/lang/Class.html)`<? extends `[Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation.html)`>` | ` annotationType() `                                                                       | | ` abstract boolean`                                                                                                                                                                         | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` abstract int`                                                                                                                                                                             | ` hashCode() `                                                                             | | ` abstract `[String](https://developer.android.com/reference/java/lang/String.html)                                                                                                         | ` toString() `                                                                             | ||

## Public methods

### bugId

```
int bugId ()
```

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

<br />

|      Returns      ||
|-------|------------|
| `int` | int <br /> |

### detail

```
String detail ()
```

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

<br />

|                                        Returns                                         ||
|-------------------------------------------------------------------------|---------------|
| [String](https://developer.android.com/reference/java/lang/String.html) | String <br /> |

-

  ## Annotations

  - [FlakyTest](https://developer.android.com/reference/android/support/test/filters/FlakyTest)
  - [LargeTest](https://developer.android.com/reference/android/support/test/filters/LargeTest)
  - [MediumTest](https://developer.android.com/reference/android/support/test/filters/MediumTest)
  - [RequiresDevice](https://developer.android.com/reference/android/support/test/filters/RequiresDevice)
  - [SdkSuppress](https://developer.android.com/reference/android/support/test/filters/SdkSuppress)
  - [SmallTest](https://developer.android.com/reference/android/support/test/filters/SmallTest)
  - [Suppress](https://developer.android.com/reference/android/support/test/filters/Suppress)