I’m trying to figure out what testing etc libraries I should be using for julia, especially for property-based testing. I’m aware of SafeTestSets.jl, TestSetExtensions.jl, ReferenceTests.jl, UnitTestDesign.jl, RandomizedPropertyTest.jl Are there any other libraries I should look into?
Is the main way to program with contracts in Julia to use ‘traits’?
Note that the original poster on Slack cannot see your response here on Discourse. Consider transcribing the appropriate answer back to Slack, or pinging the poster here on Discourse so they can follow this thread. (Original message )(More Info)
I’ll now transcribe the responses, since they were interesting (though I feel like this transcription should be automatable):
Valentin:
I’m not aware of any package explicitly for property based testing (though I’ve worked on a prototype I’m not happy with)
In julia, traits are mostly used to encode extra information that’s not part of the type, to change or control dispatch more finely grained
most of the time, regular dispatch and duck typing is enough though
When I brought up RandomizedPropertyTest, Valentin pointed out that it has a serious shortcoming:
RandomizedPropertyTest.jl does type based generation and no shrinking, sadly
in julia we don’t really have the same kind of type information as Haskell, so type based shrinking doesn’t come for free for composite types Integrated vs type based shrinking - Hypothesis