In Eclipse, how do I run a JUnit test case multiple times

后端 未结 4 1526
深忆病人
深忆病人 2020-12-31 19:44

I have a unit test that fails sometimes and debugging it is a pain because I don\'t know why it sometimes fails.

Is there a way inside Eclipse that I can run a JUnit

4条回答
  •  臣服心动
    2020-12-31 20:09

    Have you tried something like this?

    @Test
    public void runMultipleTests() {
        for (int i = 0; i < 10; i++) {
            myTestMethod();
        }
    }
    

提交回复
热议问题