Create a new jUnit rule to provide functionality of test cases rerun on exceptions.
Test rule should have 2 parameters:
retryCount
— amount of retries before test should be failed.- Array of exception classes on which retry should be performed.
Create a new jUnit runner to provide functionality of test cases rerun on exceptions.
Functionality of the runner should be the same as functionality of the rule, you have created.
Think about the runner parameters, how the runner can be configured?