How do I programmatically run all the JUnit tests in my Java application?

后端 未结 6 1950
逝去的感伤
逝去的感伤 2021-02-02 18:13

From Eclipse I can easily run all the JUnit tests in my application.

I would like to be able to run the tests on target systems from the application jar, without Eclipse

6条回答
  •  情深已故
    2021-02-02 19:06

    Get the Java project and pass the project

    JUnitLaunchShortcut jUnitLaunchShortcut = new JUnitLaunchShortcut();
    jUnitLaunchShortcut.launch("Pass the Java Project containing JUnits Classes", "run");
    

提交回复
热议问题