Retry JUnit failed tests immediately | Automation Rhapsody
There are mainly three approaches to make JUnit retry failed tests.
- Maven Surefire or Failsafe plugins – follow plugin name links for more details how to use and configure plugins
- JUnit rules – code listed in current post can be used as a rule. See more for rules in Use JUnit rules to debug failed API tests post. Problem is @Rule annotation works for test methods only. In order to have retry logic in @BeforeClass then @ClassRule object should be instantiated.
- JUnit custom runner – this post is dedicated on creating own JUnit retry runner and run tests with it.
Read full article from Retry JUnit failed tests immediately | Automation Rhapsody
No comments:
Post a Comment