test-check

2019-12-17T00:21:55.002700Z

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 spiting the values inside the for-all closure.

2019-12-17T00:29:17.004200Z

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

2019-12-17T00:29:52.005200Z

So if you don't get your test into that form you'll be fighting the system the whole time

2019-12-17T00:35:20.006200Z

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.

2019-12-17T00:48:08.006500Z

Thanks! That helped, I had an issue in my generator.

👍 1
2019-12-17T01:46:55.007700Z

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

👍 1