How to default the source folder for new JUnit tests in Eclipse?

后端 未结 3 457
伪装坚强ぢ
伪装坚强ぢ 2020-12-25 10:52

Most of our Eclipse projects have multiple source folders, for example:

  • src/main/java
  • src/test/java

When you right-click on a class and

相关标签:
3条回答
  • 2020-12-25 11:09

    No.

    Unless you change the plugin code, the default source folder is always the same as that containing the class you right clicked on (not necessarily the first source folder listed). I agree, it would be nice to be able to change it!

    0 讨论(0)
  • 2020-12-25 11:15

    I use moreUnit, an Eclipse plugin to assist writing unit tests. Among other features, it lets you configure the default source folder of tests.

    0 讨论(0)
  • 2020-12-25 11:16

    Now you can use my fast code eclipse plug-in. With this plug-in you can configure the test path to be src/test/java only once. It also has a jump to the unit test feature. It is available at : http://fast-code.sourceforge.net/.

    0 讨论(0)
提交回复
热议问题