0

The question here is a variant of Easy way of running the same junit test over and over?

The above mentioned link nicely answered how to run a test repetitively through IntelliJ.

However, I need a way to run the entire test suite multiple times, with @Before and @After for every run.

Any help is appreciated.

shahharshil46
  • 172
  • 3
  • 10

1 Answers1

0

Hello you can use junit Rule for this purposes

Here is link with example:

https://www.testwithspring.com/lesson/introduction-to-junit-4-rules/

Here is documentation link :

https://junit.org/junit4/javadoc/4.12/org/junit/Rule.html

Mykhailo Moskura
  • 2,073
  • 1
  • 9
  • 20