Allows for retrying a test a specified number of times before finally failing.