Is it possible to run JUnit tests from multiple packages in Eclipse?

前端 未结 7 1728
Happy的楠姐
Happy的楠姐 2021-02-01 12:43

Is it possible to run JUnit tests for multiple packages at the same time without manually creating test suites.

For example if I have the hierarchy:

code.brancho

7条回答
  •  一向
    一向 (楼主)
    2021-02-01 13:17

    I beleieve that you can add all your test packages to a single directory. If you right click on this directory, then you should find the "run as -> JUnit test" option available. This will run all tests contained in the directory and will catch anything you've added. Any new tests get put in there with the rest of them and whatever package name you have it doesn't matter. Hope that helps

提交回复
热议问题