Hi all, I'm debugging a failing test that uses test.check
's defspec
. When my test fails, I'm able to obtain the seed and I can see the value that caused the test to fail, however, neither the exact value or the reduced value produce the failure.
I reckon it's the sequence of values that cause the failure Dx
Is there a way that I can output the values so that I can execute them in order and see the failure? The only thing that comes to mind is spit
ing the values inside the for-all
closure.
That would work. This isn't a "supported" scenario because it's assumed that your test passes or fails solely based on the generated values
So if you don't get your test into that form you'll be fighting the system the whole time
Right. In this case, I'm doing a roundtrip test with a DynamoDBLocal instance so I bet I'm overwritting something causing failure in the tests.
Thanks! That helped, I had an issue in my generator.
For db stuff, I'd generally look for a way to reset the db at the beginning of each trial, or partition the data so it doesn't overlap