-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How should Properties.overrideParameters work? #360
Comments
Did it work after #234 was merged and released in version 0.13.2? Or did it stop working more recently? Or has it never worked? |
I tried with ScalaCheck version 0.13.1 (before #234 was merged) and with 0.13.2 (after #234 was merged). The results are the same as above: ScalaCheck: 1.13.1 BasicProps with override (1000)
Basic2Props without override
ScalaCheck 1.13.2 BasicProps with override (1000)
Basic2Props without override
From the above it looks like it never worked as expected since 1.13.1 at least. |
When it was introduced in #188 it was suggested by @rickynils that it was a good first start, but would only work for property collections, and that a better approach was in the works for ScalaCheck 2.0. |
The above configurations all run property collections not individual props - which I presume would also be supported in ScalaCheck 2.0. It should be possible to fix the current implementation to work as expected at least until ScalaCheck 2.0 drops. I'm happy to take a crack at it if the expected behaviour is as per the precedence outlined in my original issue. |
Hi, I am experiencing the same issue as @ssanj and would be very glad if this issues could be resolved somehow. Is the suggested PR in #365 an acceptable and working solution (disregarding, for the moment, the current merge conflict)? Is there something I could do to help? (I tested running a similar test in IntelliJ and on the commandline and it seems to work fine. But, as noted, does not work in SBT.) |
This is a question around how Properties.overrideParameters should work and is linked to #233 and #234. I'm seeing slightly different behaviour depending on whether I'm running the Property through SBT test or through SBT run-main (command line) with and without overrides.
Given the following property:
I wanted to run the above property more than a 100 times to provoke a failure. I've overridden overrideParameters and set withMinSuccessfulTests to 1000.
When I run this through SBT with the test command I get the following:
I'm a bit confused as to why the above property wasn't run with a 1000 tests.
When I run this through SBT with test:run-main (command line) I get the following:
In the above case it honours the withMinSuccessfulTests of a 1000.
If I try to override the value of withMinSuccessfulTests from the command line through run-main with -s I get the following:
The command line override doesn't seem to work if withMinSuccessfulTests has been set on the property.
If I define the following property without any overrides:
Running test:run-main with an override for the number of minimum successful tests, I get:
It looks like the default number of minimum successful tests are overridden in this case.
Running with SBT test uses the defaults:
Running with SBT test:run-main uses the defaults:
I would have assumed the following would be the precedence for overriding values to ScalaCheck:
Is this not the expected behaviour?
The text was updated successfully, but these errors were encountered: