scalatest / scalatestplus-scalacheck

ScalaTest + ScalaCheck provides integration support between ScalaTest and ScalaCheck.
Apache License 2.0
57 stars 24 forks source link

Need options to specify "-S" option in maven/gradle/bazel #62

Open tribbloid opened 1 year ago

tribbloid commented 1 year ago

According to the official document of scalatest + scalacheck integration:

https://www.scalatest.org/user_guide/property_based_testing

The only bay to specify randomisation seed is through sbt:

testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-S", "123456789")

In the meantime, many of the largest Scala project that uses scalatest + scalacheck (e.g. twitter's The Algorithm & Apache Spark) have chosen maven / bazel instead of sbt. This effectively blocked them from using this feature.

We need to expose this option to all build systems equally, not just sbt

cheeseng commented 1 year ago

@tribbloid It is actually an official argument supported by Runner, but seems like we didn't include it in the following page:

https://www.scalatest.org/user_guide/using_the_runner

I'll include it in that page, meanwhile I'll check our maven plugin to make sure it accepts the argument. I am not sure about bazel though.

tribbloid commented 1 year ago

@cheeseng thanks a lot! I ignored it first as it doesn't contain "-S" for random seed (it is in the sourcecode, as in the latest version), I hope that's the only missing piece