【问题标题】:How to run scala unit test cases in Eclipse如何在 Eclipse 中运行 Scala 单元测试用例
【发布时间】:2020-07-05 16:20:33
【问题描述】:

我在 Eclipse 中创建了一个 scala-spark 应用程序。我可以运行 Spark 代码,但是当我尝试通过 右键单击-> Run As 运行 scala MainTest.scala 时,他们无法运行测试用例。

这是我的项目结构。



这是我的单元测试用例。



此处未显示任何选项。



未显示任何测试选项卡。



scalatest的依赖:

<dependency>
    <groupId>org.scalatest</groupId>
    <artifactId>scalatest_sjs1_2.13</artifactId>
    <version>3.2.0-M4</version>
    <scope>test</scope>
</dependency>

【问题讨论】:

    标签: eclipse scala scalatest


    【解决方案1】:

    我们可以通过直接右键单击测试文件夹来运行 scala 测试用例。它将运行所有测试用例,但在我的情况下不能运行单个文件。

    【讨论】:

      猜你喜欢
      • 2011-02-28
      • 2022-01-02
      • 2012-01-20
      • 1970-01-01
      • 2016-02-27
      • 2013-03-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多