Fork me on GitHub
#testing
<
2015-09-28
>
meikemertsch10:09:39

Hi. I'm just in my first days of testing with test.check and prismatic schema. I ran into performance issues right away as a suite of about 20 tests took already 80 seconds. Nope I'm not talking GUI. Those were generator-unit-tests. If anyone has the same problem, this is what helped me a lot: http://blog.muhuk.com/2015/09/17/performance_tuning_clojure_generative_tests.html#.VgjjWSCqpBc I decided to cache the really expensive datastructures. Now those same checks run in ~2.5 seconds

nberger13:09:48

Cool! Good to know about your experience. I guess caching has to be taken with care, to not reduce the "randomness" so much, but seems like a good strategy when you have a combination of generators, some of which are "expensive". You lose the shrinking on them though...