我想使用带有akka-testkit的utest。如何在akka-testkit中禁用ScalaTest?
运行测试时,每次都会执行一个空的ScalaTest。
[info] ScalaTest
[info] Run completed in 957 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 0, aborted 0
[info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
[info] No tests were executed.
[info] utest
[info] Tests: 1, Passed: 1, Failed: 0
[info] Passed: Total 1, Failed 0, Errors 0, Passed 1发布于 2019-08-02 17:31:02
尝试取消注册ScalaTest,方法是将其从build.sbt中的testFrameworks设置中过滤出来,如下所示
testFrameworks := {
testFrameworks.value.filterNot(_.toString.contains("scalatest"))
}现在show testFrameworks给出了
show testFrameworks
[info] * TestFramework(org.scalacheck.ScalaCheckFramework)
[info] * TestFramework(org.specs2.runner.Specs2Framework, org.specs2.runner.SpecsFramework)
[info] * TestFramework(org.specs.runner.SpecsFramework)
[info] * TestFramework(com.novocode.junit.JUnitFramework)
[info] * TestFramework(utest.runner.Framework)我们看到TestFramework(org.scalatest.tools.Framework, org.scalatest.tools.ScalaTestFramework)不存在的地方。
https://stackoverflow.com/questions/57323272
复制相似问题