开发者

Configuring junitxml output for specs2 tests in sbt 0.10

开发者 https://www.devze.com 2023-03-26 05:58 出处:网络
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:

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

精彩评论

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