Can I avoid running junit tests twice in eclipse when using a TestSuite?

前端 未结 5 1261
隐瞒了意图╮
隐瞒了意图╮ 2020-12-16 13:55

I need to do some per-suite initialisation (starting a web-server). It is working fine except that when I run all tests in my project in eclipse my tests run twice. My test

5条回答
  •  情书的邮戳
    2020-12-16 14:39

    No, the test class will always be started directly and then through the "link" in the suite. This is as expected.

    One workaround might to set in the run configuration to only run tests from the package which contains your suites. Open the run configuration and select Run all tests in the selected project, package or source folder then click Search... and select the package.

提交回复
热议问题