0

i'am trying to achieve, that my testsuite will be executed multiple times. JUnit 4.10 demonstrate it easiely:

I have two testclasses into my suite:

@RunWith(Suite.class)
@SuiteClasses({ TestClassA.class, TestClassB.class })
public class MyTestSuite {



}

But i dont know, how can i determine, that the standard-runner "Suite.class" execute my MyTestSuite multiple times?

Roma Kap
  • 517
  • 1
  • 8
  • 23
  • Why would you want to run them multiple times? Don't you trust them enough to work once? Or maybe your tests depend on race conditions or something. – byxor Dec 11 '16 at 14:08
  • i want easiely do regression tests :) – Roma Kap Dec 11 '16 at 14:36
  • I don't understand. If you run the tests 10 times, you'll get the exact same output 10 times (assuming they're good tests), so it's pointless. – byxor Dec 11 '16 at 14:57
  • Please read this: https://en.wikipedia.org/wiki/Regression_testing You dont know about the issues and goals of my project. Maybe it is necessary, that one test will be rerun more times, to ensure that is still correct. – Roma Kap Dec 11 '16 at 15:11
  • I know what regression testing is. But you're supposed to re-run the tests _after_ you've changed something... Running them 10 times in a row isn't regression testing. – byxor Dec 11 '16 at 15:15
  • I would re-run tests anyway, when i changed something. My goal was implement unit-test as regression-test – Roma Kap Dec 11 '16 at 15:27

0 Answers0