Run Junit-Tests from several projects conveniently fast in Eclipse

后端 未结 4 1332
离开以前
离开以前 2021-01-03 21:49

Is there a way to run JUnit-Tests from several projects conveniently fast in Eclipse?

The JUnit-Runner lets you define a package or a folder where from all contained

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-03 22:27

    It’s actually quite easy to perform JUnit tests across multiple projects from within Eclipse. Have a look at Classpath Suite. It’s not with the standard JUnit runner, but you did not mention where that requirement came from, so I’m not sure whether this will affect you.

    All the usage information is on that page, but to summarize:

    1. Create an Eclipse project depending on all the projects you want to test.
    2. Write a simple test suite including everything:

      @RunWith(ClasspathSuite.class)  
      public class MySuite {}
      

提交回复
热议问题