0

I have a set of tests that I have written in Cucumber and Java. What I am trying to do is write some code where once all tests are done running, to start over again and to do that x number of times. I tried using a while loop but that didn't work. I added the following in Java cucumber code at the end but it didn't go back and run it again.

//Repeat test
public static class Repeat {
    public static void main(String[] args) {

        for(int i = 0; i < 10; i++) {

            System.out.println("Counter:  " + i);
        }
    }
}
  • Does this help: https://stackoverflow.com/questions/1492856/easy-way-of-running-the-same-junit-test-over-and-over ? – pringi May 11 '22 at 14:49
  • What problem are you actually trying to solve? This sounds like an https://xyproblem.info/ right now. – M.P. Korstanje May 12 '22 at 02:43

0 Answers0