I've got an SBT project using a couple of test frameworks (ScalaTest and ScalaCheck). For the most part this just works as expected. Eg. running test runs both variations of tests.
libraryDependencies ++= Seq(
...
"org.scalatest" %% "scalatest" % "2.2.4" % "test",
"org.scalacheck" %% "scalacheck" % "1.12.5" % "test"
)
However when running test-only, when I try to supply an argument to ScalaCheck, ScalaTest steps in and complains:
test-only *SomeProp -- -s 10
[error] (test:testOnly) java.lang.IllegalArgumentException: Specifying a suite (-s ) or nested suite (-i ) is not supported when running ScalaTest from sbt; Please use sbt's test-only instead.
In the above example ScalaTest has been invoked with the -s argument instead of ScalaCheck.
By looking at the test fingerprints for ScalaTest:
superclass is "org.scalatest.Suite" or annotated with: "org.scalatest.WrapWith"
and ScalaCheck:
superclass is either "org.scalacheck.Properties" or "org.scalacheck.Prop"
I assume there should be no confusion on the part of SBT as to which framework to run for a given type of test given the above fingerprints. (*SomeProps variants extend org.scalacheck.Properties.)
Is there some way for me to specify which test framework to invoke with test-only? If not do I need to configure SBT to run ScalaTest and ScalaCheck in different configurations?