RepetitionInfo is used to inject information about the current
repetition of a repeated test into @RepeatedTest, @BeforeEach,
and @AfterEach methods.
If a method parameter is of type RepetitionInfo, JUnit will
supply an instance of RepetitionInfo corresponding to the current
repeated test as the value for the parameter.
Warning
RepetitionInfo cannot be injected into
a @BeforeEach or @AfterEach method if the corresponding test
method is not a @RepeatedTest. Any attempt to do so will result in a
ParameterResolutionException.
RepeatedTest, TestInfo
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public int | getFailureCount()
Get the current number of repetitions of the corresponding
|
| public int | getFailureThreshold()
Get the configured failure threshold of the corresponding
|
| public int |
| getCurrentRepetition | back to summary |
|---|---|
| public int getCurrentRepetition() Get the current repetition of the corresponding
| |
| getFailureCount | back to summary |
|---|---|
| public int getFailureCount() Get the current number of repetitions of the corresponding
| |
| getFailureThreshold | back to summary |
|---|---|
| public int getFailureThreshold() Get the configured failure threshold of the corresponding
| |
| getTotalRepetitions | back to summary |
|---|---|
| public int getTotalRepetitions() Get the total number of repetitions of the corresponding
| |