找到你要的答案

Q:How do I make IntelliJ IDEA run all the tests in a package including sub packages

Q:我怎么能让IntelliJ IDEA运行包中包括的子包的所有测试

If I click on a package and do control-shift-F10 it only looks for and runs JUnit tests in that package - but I really want it to recurse down into subpackages and run them.

UPDATE: looks like its something else wrong. When I run it on a package that has tests, it still complains there are none (yet if I open a JUnit test I can run it just fine).

如果我点击了一个包,做control-shift-f10只寻找并运行在那个包,但我真的很想递归分解成子包运行JUnit测试。

更新:看起来像其他东西错了。当我运行在一个包,已经测试,它还抱怨是没有的(如果我开一个JUnit测试我能跑的很好)。

answer1: 回答1:

The default key combination to run all tests is Ctrl+Shift+F10

默认的组合键来运行所有测试是按Ctrl + Shift + F10

answer2: 回答2:
  1. Alt+Shift+F10
  2. Create a new junit test configuration
  3. Name it "All tests"
  4. Include entire package
  5. Apply/Run.

From @andersoyvind's comment.

  1. Alt+Shift+F10
  2. Create a new junit test configuration
  3. Name it "All tests"
  4. Include entire package
  5. Apply/Run.

从“andersoyvind的评论。

intellij-idea