Sadly I don’t think something like `MinSize` is po...
# kotest
s
Sadly I don’t think something like
MinSize
is possible for
Arb<List<A>>
etc, which is also what I’m looking for in combination with
minSuccessful
. This way I could easily reduce the stress of the test suite depending on where it runs, or depending on what platform it runs when moving to MPP.
s
By stress are you wanting to chang the number of tests basically, depending on env ?
s
Yes, I’d like to configure iterations for
checkAll
and potentially also depth of
Arb.list
or similar. I’m writing property based tests for the new Arrow streaming library, and controlling depth and iterations allows for a much more powerful test suite.
Without killing my local dev machine or free CI 😄
s
There is support for iterations and minSuccess and maxFailures. You could set the iteration count via a sys prop ?
Or set it but have a default
s
Oh I must have missed that.
s
There's several overloads on checkAll. One takes iterations, another takes iterations and PropTestConfig
Copy code
data class PropTestConfig(
   val seed: Long? = null,
   val minSuccess: Int = Int.MAX_VALUE,
   val maxFailure: Int = 0,
   val shrinkingMode: ShrinkingMode = ShrinkingMode.Bounded(1000),
   val iterations: Int? = null,
   val listeners: List<PropTestListener> = listOf()
)
that should have all the options you need
s
Yes, I should be able to find my way through that! Thanks.
I’ll share the test suites as soon as I publicly PR them. I also have
Arb
for
Array
etc which we might want to PR upstream to kotest
s
Yes please that would be great