RepeatTestOnExceptionRule
class RepeatTestOnExceptionRule(attemptsCount: Int, runBeforeTest: () -> Unit? = null, runAfterTest: () -> Unit? = null) : TestRule
Try running a test at most attemptsCount times, only failing after the last attempt ends with an exception. When an attempt succeeds, no more attempts are made.
This rule can optionally run actions before and after every attempt, by using the runBeforeTest and runAfterTest lambdas.
Constructors
Link copied to clipboard
fun RepeatTestOnExceptionRule(attemptsCount: Int, runBeforeTest: () -> Unit? = null, runAfterTest: () -> Unit? = null)