如何使 IntelliJ IDEA 运行 包括子包在内的所有测试

How do I make IntelliJ IDEA run all the tests including sub packages

如果我点击一个包并执行 control-shift-F10,它会失败并出现以下错误:

Error running ScalaTests in 'tests': Not found suite class.

打开测试配置时,我看到 "Test Package" 是

src.main.scala.com.myproject.pro.integration.tests

当我将其更改为:

com.myproject.pro.integration.tests

它只是 运行 第一级中存在的测试,没有 运行 子包测试。

我的配置:

解决方法是:

1- 将父文件夹标记为 "Test Sources Root"

2- 单击您的套件,然后单击 control-shift-F10

3-运行 测试