Open nau opened 1 year ago
@nau Sorry to hear about your pain, and I fully agree with you. I think one way is to add the init seed a new PropertyCheckConfigParam passed to forAll so that you can set the value per invocation. We may need to do that in the upcoming 3.3/4 release since it'll break binary compat.
Anyway, I'll add in something about setting the initial seed through -S in the README of scalatestplus-scalacheck, hope it will help.
@nau I added some text about the steps required to set initial seed for current version, you may find it in this page:
https://www.scalatest.org/user_guide/property_based_testing
For adding it to PropertyCheckConfigParam I think we'll have to add it in the next version, e.g. 3.3.0 or 4.x.
@nau fyi you may want to try the approach using testOnly?
It did work, thank you. Thank you for updating the docs.
The sole purpose of property-based testing is to find a bug in your code, reproduce it with a seed, and then fix it. For some weird reason I can't find an easy way to re-run a test with a given seed using ScalaTest+ScalaCheck.
This way of doing this is horrible:
set ThisBuild/Test/testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-S", "-4690408743289064788")
It's slow, requires sbt reload, and hard to apply to a single test case.
This basic functionality should looks something like:
Also, it's almost impossible to find how to do this very basic thing in the documentation. This should be stated in the second paragraph of any docs, tutorial, or demo.
Please, please, do something about it. It's the most useful and important feature, I can't believe it's so frustrating to use.