ScalaCheck issue (w/ junitxml?) in 3.6.4, not present in 2.4.2

26 views
Skip to first unread message

ach...@box.com

unread,
Sep 8, 2015, 8:25:09 PM9/8/15
to specs2-users
My project has some simple ScalaCheck tests, and when I use 2.4.2 everything runs fine. However, when I use 3.6.4, I get

java.lang.Exception: Invalid ScalaCheck args: List(junitxml, console)

Maybe this is a ScalaCheck issue, but wondering if maybe something changed in Specs2? Ideally I would not have to alter the build too much as this is eventually sent to Jenkins which I'm guessing uses junitxml.

Thanks!

etorreborre

unread,
Sep 9, 2015, 6:30:20 PM9/9/15
to specs2-users
This looks like a sbt configuration issue.

You must be passing test arguments to all frameworks whereas you need to be specific:

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

I suspect that some earlier version of ScalaCheck was not checking its arguments.

Eric

Kenji Yoshida

unread,
Sep 10, 2015, 3:20:14 AM9/10/15
to specs2-users

ach...@box.com

unread,
Sep 12, 2015, 1:40:16 AM9/12/15
to specs2-users
@etorreborre, I copy/pasted that into my build.sbt, same error. This is on Specs2 3.6.

etorreborre

unread,
Sep 13, 2015, 12:51:49 AM9/13/15
to specs2-users
That's weird because you seem to have the same issue as the one described here: https://github.com/rickynils/scalacheck/issues/173.

And the solution was indeed to specify the specs2 args only for the specs2 framework in sbt. 

Since this seems to be a regression from 1.12.1 to 1.12.3 maybe you can also try to downgrade your ScalaCheck version to 1.12.1?

ach...@box.com

unread,
Sep 14, 2015, 12:18:42 AM9/14/15
to specs2-users
So doing

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

worked - I hadn't realized that there were similar settings (albeit with TestFrameworks.Specs2 omitted) in the top-level build configuration. Changing that fixed the issue. Thanks!

etorreborre

unread,
Sep 14, 2015, 12:27:27 AM9/14/15
to specs2-users
Great!
Reply all
Reply to author
Forward
0 new messages