Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuring junitxml output for specs2 tests in sbt 0.10

Tags:

scala

sbt

specs2

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.testOptions ++ Seq(TestArgument("junitxml"))

How do I say the same thing in sbt 0.10?

like image 559
Adam Pingel Avatar asked Aug 04 '11 00:08

Adam Pingel


1 Answers

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")

like image 106
user1633296 Avatar answered Sep 29 '22 11:09

user1633296