JUnit5: How to repeat failed test?

前端 未结 3 1496
半阙折子戏
半阙折子戏 2021-02-06 02:17

One of the practice many companies follow is to repeat unstable test until is passes x times (in a row or in total). If it is executed n times and fail to pas

3条回答
  •  余生分开走
    2021-02-06 03:15

    if you are running tests via Maven, with Surefire you care re-run failing tests automatically by using rerunFailingTestsCount.

    However, as of 2.21.0, that does not work for JUnit 5 (only 4.x). But hopefully it will be supported in the next releases.

提交回复
热议问题