# JankTest

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

# JankTest

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


`


implements

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


`

|------------------------------------|
| android.support.test.jank.JankTest |

<br />

*** ** * ** ***

Annotation used to configure a jank test method.

## Summary

|                                                                                                                                                                                               ### Public methods                                                                                                                                                                                                ||
|----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[afterLoop](https://developer.android.com/reference/android/support/test/jank/JankTest#afterLoop())`() ` Alternate method to execute after each iteration Note: the annotated method must have same signature as [afterLoop()](https://developer.android.com/reference/android/support/test/jank/JankTestBase#afterLoop())       |
| ` `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[afterTest](https://developer.android.com/reference/android/support/test/jank/JankTest#afterTest())`() ` Alternate method to execute after all iterations have completed.                                                                                                                                                        |
| ` `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[beforeLoop](https://developer.android.com/reference/android/support/test/jank/JankTest#beforeLoop())`() ` Alternate method to execute before each iteration Note: the annotated method must have same signature as [beforeLoop()](https://developer.android.com/reference/android/support/test/jank/JankTestBase#beforeLoop())  |
| ` `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[beforeTest](https://developer.android.com/reference/android/support/test/jank/JankTest#beforeTest())`() ` Alternate method to execute before the test method Note: the annotated method must have same signature as [beforeTest()](https://developer.android.com/reference/android/support/test/jank/JankTestBase#beforeTest()) |
| ` int`                                                                     | ` `[defaultIterationCount](https://developer.android.com/reference/android/support/test/jank/JankTest#defaultIterationCount())`() ` Default iteration count to run if not specified by command line                                                                                                                                 |
| ` int`                                                                     | ` `[expectedFrames](https://developer.android.com/reference/android/support/test/jank/JankTest#expectedFrames())`() ` The minimum number of frames expected                                                                                                                                                                         |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/jank/JankTest#)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

### afterLoop

```
String afterLoop ()
```

Alternate method to execute after each iteration


Note: the annotated method must have same signature as [afterLoop()](https://developer.android.com/reference/android/support/test/jank/JankTestBase#afterLoop())

<br />

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

### afterTest

```
String afterTest ()
```

Alternate method to execute after all iterations have completed.


**Important:** the annotated method must take a parameter of type
[Bundle](https://developer.android.com/reference/android/os/Bundle.html).

<br />

<br />

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

**See also:**

- [afterTest(android.os.Bundle)](https://developer.android.com/reference/android/support/test/jank/JankTestBase#afterTest(android.os.Bundle))  

### beforeLoop

```
String beforeLoop ()
```

Alternate method to execute before each iteration


Note: the annotated method must have same signature as [beforeLoop()](https://developer.android.com/reference/android/support/test/jank/JankTestBase#beforeLoop())

<br />

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

### beforeTest

```
String beforeTest ()
```

Alternate method to execute before the test method


Note: the annotated method must have same signature as [beforeTest()](https://developer.android.com/reference/android/support/test/jank/JankTestBase#beforeTest())

<br />

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

### defaultIterationCount

```
int defaultIterationCount ()
```

Default iteration count to run if not specified by command line

<br />

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

### expectedFrames

```
int expectedFrames ()
```

The minimum number of frames expected

<br />

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

-

  ## Annotations

  - [GfxMonitor](https://developer.android.com/reference/android/support/test/jank/GfxMonitor)
  - [JankTest](https://developer.android.com/reference/android/support/test/jank/JankTest)
-

  ## Classes

  - [JankTestBase](https://developer.android.com/reference/android/support/test/jank/JankTestBase)