Description
The only code that looks at the test selectors supplied via the sbt.testing.TaskDef
is ScalaCheckRunner.checkPropTask()
; it recognizes sbt.testing.TestSelector
s and selects the properties with the exact names supplied; it should also recognize sbt.testing.TestWildcardSelector
s and select the properties with the names containing the wildcard supplied.
Also, ScalaCheckRunner.deserializeTask() should probably count sbt.testing.TestWildcardSelector
s towards countTestSelectors
and thus dispatch to ScalaCheckRunner.checkPropTask()
and not to ScalaCheckRunner.rootTask()
if any are supplied.
Finally, whatever test selection functionality ScalaCheck
provides only kicks in in very specific use cases:
- when
ScalaCheckRunner.deserializeTask()
is called or - when class name of the
sbt.testing.Fingerprint
used contains"ForkMain"
.
When running ScalaCheck
the "official" sbt.testing
way, by calling ScalaCheckRunner.tasks()
with the fingerprints returned from ScalaCheckFramework.fingerprints()
(none of which contain "ForkMain"
in their class names), ScalaCheckRunner.checkPropTask()
is never called, and no test selection is applied.
Context: Scala.js Gradle plugin integrates with sbt.testing
-enabled test frameworks, and ScalaCheck
is among them. Plugin does its own TaskDef
serialization/deserialization in a way that is not specific to the test framework used, but works with Gradle. As a result of the above idiosyncrasies in the ScalaCheck
's test selection functionality, plugin can not access any of it :(