【问题标题】:Execute multiple Scalatests in IntelliJ在 IntelliJ 中执行多个 Scalatests
【发布时间】:2018-02-05 22:16:50
【问题描述】:

我有多个具有 build.sbt 文件和 scalatest 代码的 IntelliJ (Scala) 模块。

我还为它们中的每一个创建了 ScalaTest 配置。

我可以逐个运行测试,但是否可以一次运行所有测试?

【问题讨论】:

    标签: scala intellij-idea scalatest


    【解决方案1】:

    您可以运行一个模块的所有 scalates:

    • 右键单击(子)模块
    • 运行 >
    • [模块名称] 中的 ScalaTests

    但我不知道How to run all scalatest of a multi-modules sbt with intellij? :-\

    【讨论】:

      【解决方案2】:

      我猜要执行多个测试,可能需要使用sbt aggregation,如Execute multiple Scalatests in sbt 中所述。

      在 IntelliJ IDE 中,我们可以只使用 ScalaTest 来测试和调试一个模块的测试。

      使用批处理模式,可以轻松地使用 sbt 执行多个测试。

      Adding module dependency information in sbt's build.sbt file

      【讨论】:

        【解决方案3】:

        如果您的项目是 maven 项目,您可以尝试使用“测试”命令(在屏幕截图中)运行所有测试。这将执行你的 test/scala 目录下的所有测试。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2013-06-12
          • 2017-02-14
          • 1970-01-01
          • 2015-10-04
          • 1970-01-01
          • 2017-05-04
          相关资源
          最近更新 更多