-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Hedgehog report progress #77
Comments
Also is |
@1Jajen1 Please show me the code you're working on. I'd be happy with fixes/improvements of course. |
Sure: https://github.com/1Jajen1/Brokkr/blob/main/brokkr-cesu8/test/ModifiedUtf8Spec.hs. The old tasty code is in the
Tasty can somewhat output in a parallel setting, it seems to output top down and update progress for the current top test under evaluation. For reference this is what hedgehog outputs and updates during the test (
Why's that? I find hedgehog much nicer to use than quickcheck. Especially their error reporting is amazing.
Its a bit verbose (especially because I am doing a few hundred thousand iterations), but it definitely helps. |
@1Jajen1 It's pretty important to me that sydtest doesn't delete any of the output it's already sent. Those kind of fancy things tend to leave the terminal in a state where you need to reset it.
Being required to write all generators yourself throws the baby out with the bathwater. |
I'd definitely keep this optional and off by default. This is only useful in some specific circumstances or when you just want pretty output. Visual feedback for progress is nice, maybe not necessary, but nice. I also don't know how big of a change this would be. I'd assume you'd assign an output region per runner and output through that. Could also show the currently running tests then.
I mean technically nothing stops you from putting this system over hedgehog generators right? I don't mind the generators, but I'd agree that its a weak point, shrinking is also sometimes sub optimal, but that has different reasons. I haven't spent much time thinking about this, but first thoughts are: hedgehog feels more complete, the output is amazing and it has lots of useful features such as state machine testing for example.
I wish this was an option (haskell in the first place, but proper automatic testing too) |
That's not right. The shrinkers would become unusably slow (I think). |
You can just throw away the autogenerated shrink tree and add your own. Its been a few years since I've looked at the internals, but hedgehogs generators and shrinking should be compatible one to one with quickchecks generators. You should be able to create hedgehog generators from arbitrary instances without issues, but the other way around looses shrinking |
I switched a few hedgehog property tests from tasty to sydtest. Those are for cesu8 and modified utf8 validation. When changing validation, encoding or decoding, I run the property tests with a lot more examples, sometimes for an hour or two in the background.
Hedgehog and tasty print out progress updates, but sydtest is completely silent, making it harder to gauge how much longer the tests will run.
It's not too bad with
--fail-fast
but frequent progress reports would be nice to have, especially because hedgehog supports them directly.The text was updated successfully, but these errors were encountered: