开发者

Configuring junitxml output for specs2 tests in sbt 0.10

How do I configure sbt 0.10 to use the junitxml option with specs2?

The specs2 documentation says this is the way to do it using sbt 0.7.x:

override def testOptions = super开发者_StackOverflow社区.testOptions ++ Seq(TestArgument("junitxml"))

How do I say the same thing in sbt 0.10?


FYI, I found that when running Specs2 tests with juntxml SBT fails to fail when the tests fail. Adding "console" as another argument gets a build failure like you'd expect. I suspect this is some interaction between the console reporter and sbt's test driver.

testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "junitxml", "console")


This is described here in the SBT documentation:

testOptions in Test += Tests.Argument("junitxml")

And if you want to specify this option specifically for specs2:

testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "junitxml")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜