These are chat archives for etorreborre/specs2

15th
Jul 2016
Andy Scott
@andyscott
Jul 15 2016 20:09
I'm using Specs2 + Scalacheck. Are there any tricks to limiting the number of values that are tested on properties? I'd like to just limit values during local testing, to speed things up (a lot, hopefully).
Eric Torreborre
@etorreborre
Jul 15 2016 20:42
Hi @andyscott, you can control the number of successful tests with the scalacheck.mintestsok property on the command line or by writing
prop { i: Int => i must be_>(0) }.set(minTestsOk = 10)
Andy Scott
@andyscott
Jul 15 2016 20:43
Yeah I’ve been looking into that. But the issue seems to be that I’m using this with SScheck, and I can’t configure it for that.
I’m using forAllDStream, which in turn uses Prop.forAllNoShrink. I’m guessing I need to control the min/max values going there?
Aha! Got it, (using minTestsOkay). Thanks!
Eric Torreborre
@etorreborre
Jul 15 2016 20:48
yes it works as well on a normal ScalaCheck Prop
Andy Scott
@andyscott
Jul 15 2016 20:50
I am a bit inexeperienced with both Specs2 and Scalacheck.
Eric Torreborre
@etorreborre
Jul 15 2016 20:50
I am glad to help :-)
Andy Scott
@andyscott
Jul 15 2016 20:50
:clap: :clap:
My colleages are slowly converting me from Scalatest
Eric Torreborre
@etorreborre
Jul 15 2016 20:52
I am about to head to sleep now, please leave your questions here if you have any, I'll have a look in the morning. (or during the night if I get insomnia :-))
Andy Scott
@andyscott
Jul 15 2016 20:57
Will do. I should be good for now.
Most of my questions would be about sscheck, which is a bit out of the scope of this channel.
Most of my questions in the immediate future at least.