how to make scalatest generate html report through sbt

后端 未结 2 1682
天涯浪人
天涯浪人 2021-02-08 20:54

The way to do this for specs2 based test in sbt is

(testOptions in Test) += Tests.Argument(TestFrameworks.Specs2, \"html\")

but how about scala

2条回答
  •  温柔的废话
    2021-02-08 21:59

    beware with that setting.

    org.scalatest" %% "scalatest" % "2.0.M6" % "test->*

    It pulls out some junit:junit:3.8.1 dependency which ivy fails to resolve. see this bug

    this is a better way to do it in ScalaTest 2.0

    testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-u", "target/test-reports")
    

    This works well in Jenkins

提交回复
热议问题