Scala 如何使用Mill运行JUnit测试
我想运行一些JUnit测试 在Scala 如何使用Mill运行JUnit测试,scala,junit,mill,Scala,Junit,Mill,我想运行一些JUnit测试 在sbt中,我要做的就是添加此依赖项: “com.novocode”%”junit接口“%”0.11“%”测试“ 根据需要,您必须添加自定义框架,如: def testFrameworks=Seq(“org.scalatest.tools.Framework”,“这里有什么?”) 我必须做些什么才能让JUnit测试正常工作?在写问题时,我发现: 在build.sh中,您有: 要添加此测试依赖项,请执行以下操作: ivy“com.novocode:junit接口:0.
sbt
中,我要做的就是添加此依赖项:
“com.novocode”%”junit接口“%”0.11“%”测试“
根据需要,您必须添加自定义框架,如:
def testFrameworks=Seq(“org.scalatest.tools.Framework”,“这里有什么?”)
我必须做些什么才能让JUnit测试正常工作?在写问题时,我发现: 在
build.sh
中,您有:
- 要添加此测试依赖项,请执行以下操作:
ivy“com.novocode:junit接口:0.11”
- 要添加此测试框架,请执行以下操作:
com.novocode.junit.JUnitFramework
object myModule extends ScalaModule {
def scalaVersion = "2.12.8"
object test extends Tests {
override def ivyDeps = Agg(
ivy"org.scalatest::scalatest:3.0.5",
ivy"com.novocode:junit-interface:0.11"
)
def testFrameworks = Seq("org.scalatest.tools.Framework",
"com.novocode.junit.JUnitFramework")
}
}