# RepetitiveTest

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Methods](https://developer.android.com/reference/android/test/RepetitiveTest#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/test/RepetitiveTest#inhmethods)  

# RepetitiveTest

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/test/RepetitiveTest "View this page in Kotlin")\|Java

`
public


abstract
@interface
RepetitiveTest
`  
`


implements

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


`

|-----------------------------|
| android.test.RepetitiveTest |

<br />

*** ** * ** ***

<br />

**This @interface was deprecated in API level 29.**   
New tests should be written using the[Android Testing Support Library](https://developer.android.com/tools/testing-support-library).

This annotation can be used on an[InstrumentationTestCase](https://developer.android.com/reference/android/test/InstrumentationTestCase)'s test methods. When the annotation is present, the test method is executed the number of times specified by numIterations and defaults to 1.

## Summary

|                                                                              ### Public methods                                                                               ||
|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` int` | ` `[numIterations](https://developer.android.com/reference/android/test/RepetitiveTest#numIterations())`() ` Indicates the number of times a test case should be run. |

| ### Inherited methods |
|-----------------------|---|
| From interface` `[java.lang.annotation.Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation)` ` |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract `[Class](https://developer.android.com/reference/java/lang/Class)`<? extends `[Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation)`>` | ` `[annotationType](https://developer.android.com/reference/java/lang/annotation/Annotation#annotationType())`() ` Returns the annotation interface of this annotation.                                                                                                                            | | ` abstract boolean`                                                                                                                                                               | ` `[equals](https://developer.android.com/reference/java/lang/annotation/Annotation#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Returns true if the specified object represents an annotation that is logically equivalent to this one. | | ` abstract int`                                                                                                                                                                   | ` `[hashCode](https://developer.android.com/reference/java/lang/annotation/Annotation#hashCode())`() ` Returns the hash code of this annotation.                                                                                                                                                   | | ` abstract `[String](https://developer.android.com/reference/java/lang/String)                                                                                                    | ` `[toString](https://developer.android.com/reference/java/lang/annotation/Annotation#toString())`() ` Returns a string representation of this annotation.                                                                                                                                         | ||

## Public methods

### numIterations

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int numIterations ()
```

Indicates the number of times a test case should be run.

<br />

|                             Returns                             ||
|-------|----------------------------------------------------------|
| `int` | The total number of iterations, the default is 1. <br /> |