How do you set the number of required succesful scalacheck tests

118 Views Asked by At

in munit scalacheck, how do I limit the number of inputs required to pass the test?

1

There are 1 best solutions below

0
Martijn On BEST ANSWER

If your test extends munit.ScalaCheckSuite, there is a protected def scalaCheckTestParameters you can override to set the test parameters. A good way to set it is to modify the value in the base class, for example

class MyTestSuite extends munit.ScalaCheckSuite {
  override val scalaCheckTestParameters = super.scalaCheckTestParameters.withMinSuccessfulTests(10)

  property("my property") {
    ...
  }
}