1
我正在做coursera的Scala课程。我正在尝试运行练习中给出的单元测试。但是,我得到了以下问题:斯卡拉Intellij运行测试套件
import org.scalatest.FunSuite
import org.junit.runner.RunWith
我GOOGLE了这一点,并找到了以下解决方案: 添加依赖这样
Error:(3, 12) object scalatest is not a member of package org
import org.scalatest.FunSuite
^
Error:(6, 12) object junit is not a member of package org
import org.junit.runner.RunWith
^
当我导入包到我的项目,这些出现
libraryDependencies += "com.novocode" % "junit-interface" % "0.8" % "test->default"
我试着将此代码添加到build.sbt
,但错误仍然存在。
你有没有重新启动SBT?有想法重新导入项目(加载新的依赖项)?项目结构的外部库列表中是否出现新的依赖项? – Rumoku